You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using the MTGSDK to fetch card data, particularly card text. However, I have encountered an issue with character encoding when fetching the card text using the MTGSDK. Specifically, certain characters like apostrophes (') are not being properly decoded in the fetched card text. This issue is consistently present across different sets and cards.
Steps to Reproduce:
Use the MTGSDK to fetch card data, including card text.
Inspect the fetched card text for characters like apostrophes (').
Expected Behavior:
The fetched card text should properly decode characters like apostrophes (') and display them correctly.
Actual Behavior:
The fetched card text displays characters like apostrophes (') in a different encoding, leading to incorrect display.
Additional Information:
I have tested different approaches to decode the characters, including using Python's html.unescape() and direct replacement of Unicode characters, but the issue persists.
The problem is not related to the specific language setting (French, in my case), as I have tested without specifying a language.
I suspect that the issue might be related to how the MTGSDK handles character encoding when fetching card data.
Example with Kayla's Command :
Kayla's Command,Rare,['W'],Sorcery,,"Choose two —
• Create a 2/2 colorless Construct artifact creature token.
• Put a +1/+1 counter on a creature you control. It gains double strike until end of turn.
• Search your library for a basic Plains card, reveal it, put it into your hand, then shuffle.
• You gain 2 life and scry 2.",,,BRO,The Brothers' War,"[{""date"": ""2022-10-14"", ""text"": ""None of the modes have any targets. Notably, this means that you don\u2019t have to choose a creature for the second mode until the spell resolves.""}]",Legal
You can show the problem at this line : Notably, this means that you don\u2019t have to choose a creature for the second mode until the spell resolves.
"don't" appear as "don\u2019t" and it is similar for so many special characters ( \u201c, \u201d, \u2014, etc...)
Thank you for the help.
Environment:
Python version: [3.11.4]
MTGSDK version: [1.3.1]
Operating System: [Windows 10 Professionnal x64]
The text was updated successfully, but these errors were encountered:
I have been using the MTGSDK to fetch card data, particularly card text. However, I have encountered an issue with character encoding when fetching the card text using the MTGSDK. Specifically, certain characters like apostrophes (') are not being properly decoded in the fetched card text. This issue is consistently present across different sets and cards.
Steps to Reproduce:
Expected Behavior:
The fetched card text should properly decode characters like apostrophes (') and display them correctly.
Actual Behavior:
The fetched card text displays characters like apostrophes (') in a different encoding, leading to incorrect display.
Additional Information:
html.unescape()
and direct replacement of Unicode characters, but the issue persists.Example with Kayla's Command :
Kayla's Command,Rare,['W'],Sorcery,,"Choose two —
• Create a 2/2 colorless Construct artifact creature token.
• Put a +1/+1 counter on a creature you control. It gains double strike until end of turn.
• Search your library for a basic Plains card, reveal it, put it into your hand, then shuffle.
• You gain 2 life and scry 2.",,,BRO,The Brothers' War,"[{""date"": ""2022-10-14"", ""text"": ""None of the modes have any targets. Notably, this means that you don\u2019t have to choose a creature for the second mode until the spell resolves.""}]",Legal
You can show the problem at this line : Notably, this means that you don\u2019t have to choose a creature for the second mode until the spell resolves.
"don't" appear as "don\u2019t" and it is similar for so many special characters ( \u201c, \u201d, \u2014, etc...)
Thank you for the help.
Environment:
The text was updated successfully, but these errors were encountered: