{"action":"created","issue":{"url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/216","repository_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot","labels_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/216/comments","events_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/216/events","html_url":"https://github.com/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/216","id":183842090,"number":216,"title":"Come up with a set of rules about when/how we canonicalize","user":{"login":"bakert","id":1541,"avatar_url":"https://avatars.githubusercontent.com/u/1541?v=3","gravatar_id":"","url":"https://api.github.com/users/bakert","html_url":"https://github.com/bakert","followers_url":"https://api.github.com/users/bakert/followers","following_url":"https://api.github.com/users/bakert/following{/other_user}","gists_url":"https://api.github.com/users/bakert/gists{/gist_id}","starred_url":"https://api.github.com/users/bakert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakert/subscriptions","organizations_url":"https://api.github.com/users/bakert/orgs","repos_url":"https://api.github.com/users/bakert/repos","events_url":"https://api.github.com/users/bakert/events{/privacy}","received_events_url":"https://api.github.com/users/bakert/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-19T01:14:07Z","updated_at":"2016-10-19T09:46:09Z","closed_at":null,"body":"And what the in-memory and in-database representation of card names should be.\r\n\r\nThis includes the in-memory list of legal cards and storage in name and name_ascii columns."},"comment":{"url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/comments/254765467","html_url":"https://github.com/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/216#issuecomment-254765467","issue_url":"https://api.github.com/repos/PennyDreadfulMTG/Penny-Dreadful-Discord-Bot/issues/216","id":254765467,"user":{"login":"bakert","id":1541,"avatar_url":"https://avatars.githubusercontent.com/u/1541?v=3","gravatar_id":"","url":"https://api.github.com/users/bakert","html_url":"https://github.com/bakert","followers_url":"https://api.github.com/users/bakert/followers","following_url":"https://api.github.com/users/bakert/following{/other_user}","gists_url":"https://api.github.com/users/bakert/gists{/gist_id}","starred_url":"https://api.github.com/users/bakert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bakert/subscriptions","organizations_url":"https://api.github.com/users/bakert/orgs","repos_url":"https://api.github.com/users/bakert/repos","events_url":"https://api.github.com/users/bakert/events{/privacy}","received_events_url":"https://api.github.com/users/bakert/received_events","type":"User","site_admin":false},"created_at":"2016-10-19T09:46:09Z","updated_at":"2016-10-19T09:46:09Z","body":"Current thinking:\r\n\r\nA card *has* a canonical English name including case and diacritics. 'Séance' is called 'Séance' and not 'seance'. 'Jötun Grunt' is called 'Jötun Grunt'. Having 'seance' or even 'seanec' match the card Séance is a decision that should be made at query time. Maybe you're making a comparison with the aliases list and you don't want any fuzzy matching.\r\n\r\nSo I think that `name` in the database, entries in the aliases list, and legal_cards in memory should all store the correctly cased and accented version.\r\n\r\npdmtgo.com/legal_cards.txt is served as text/plain with no Content-type header. Going strictly by the RFC this means we should treat it as US-ASCII. It's not, however, it's utf-8. I think this is a recent change because we used to decode it as latin-1 (Cc @binarySwordsman). Regardless, we end up with case-respecting and diacritic-having values like 'Séance' when we are done. Another argument for mixed case with diacritics as the internal canonical representation of a card name.\r\n\r\nComplications here are the following mismatches even after decoding legal_cards.txt as utf-8:\r\n\r\nFound 9809 pd legal cards in the database but the list was 9822 long\r\n{'Jotun Grunt', 'Student of Elements', 'Kitsune Mystic', 'Ifh-Bíff Efreet', 'Cunning Bandit', 'Faithful Squire', 'Nezumi Graverobber', 'Orochi Eggwatcher', 'Initiate of Blood', 'Hired Muscle', 'Bushi Tenderfoot', 'Midnight Scavengers', 'Jotun Owl Keeper'}"}}
{"actor":{"display_login":"bakert"}}