I’m trying to print()
a Unicode character “❗” (U+2757) on the console for debugging purposes in PyCharm.
I get following error: UnicodeEncodeError: 'charmap' codec can't encode character 'u2757' in position 15: character maps to <undefined>
.
I had a look at the PyCharm settings like here, and set following env variables:
PYTHONIOENCODING: utf-8
LANG: en_US.UTF-8"
The problem remains though. I’m looking for a solution without the need to use .encode()
on the individual strings.
Any idea what else I can try?
Using PyCharm on Windows 10 and Python 3.12.