Skip to content

Fix/cards with accents#239

Open
arielvicente wants to merge 4 commits intoPennyDreadfulMTG:masterfrom
arielvicente:fix/cards-with-accents
Open

Fix/cards with accents#239
arielvicente wants to merge 4 commits intoPennyDreadfulMTG:masterfrom
arielvicente:fix/cards-with-accents

Conversation

@arielvicente
Copy link
Contributor

@arielvicente arielvicente commented Feb 26, 2026

NOTE: This PR is rebased from this PR so take a look at that one first if you haven't already.

This PR fixes two issues:

  • The FixAccents method was corrupting strings and making the TestAccents tests fail. I have removed the method.
  • We had missing UTF8 encoding in IsCardLegal when fetching the legal cards from the .txt tile. This might be what the above FixAccents method was trying to fix before, but with the encoding it's no longer needed.

The above should fix most issues with cards names with accents. One potential issue that remains is specifically accented capital E's ("É"). MTGO itself seems to not be able to parse this one so I am unsure how the string that PDBot gets from the game log actually looks. If you know please let me know and I can include a fix for this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant