Search code examples
pycharmpython-unicode

Pycharm Unicode Produces Box with Question Mark


I'm running Pycharm on a Mac Mini and another instance of Pycharm on a MacBook Air. Unicode for superscript 2 (\u2072) works on Pycharm on the Mini but not on Pycharm on the MacBook Air. On the MBA it produces a question mark box in my GUI and a box with diagonal line through it when I paste the same line of code in the Console.

Played "one of these things is not like the other" but no success.

  • MacOS Sonoma on both. Both are Mac silicon (M2).
  • Python 3.12 interpreter on both.
  • Same editor Font on both.
  • Checked the installed Packages and nothing stands out to me.

Any ideas? Thanks :)


Solution

  • Works with: text="m/s\u00b2: " instead of the previously used “m/s\u2072”.

    I went to add Unicode V15 to my bookmarks for future reference and it says "2072-->reserved 00B2 superscript 2" so that must have been the confusion / reason I used \u2072 to start.