Python idle3 did not display unicode chars correctly

Hi there, I am new user and now been using Fedora 31 for few months. I am also python hobbyist and as learning tool I use Idle3. But recently I found Idle3 could not display unicode characters correctly. For example if I want to print degree fahrenheit characters, Idle3 printed ‘\u2109’. Interesting, if I use Python console, the character displayed perfectly. So I guess the issue is in tcl/tk library. Anybody ever encountered same issue? Please advise fix for this. Thanks

I’m badly sorry:
IDLE, default Gnome3 F-Workstation 31 (slightly outdated, will update at 3rd of February):

# a.py
print('℉')
print('\u2109')
# Run -> Run Module (F5)
Python 3.7.6 (default, Dec 19 2019, 22:52:49) 
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
=========================== RESTART: /home/vits/a.py ===========================
℉
℉
>>> 

Maybe your need to install some fonts, etc…

PS: Are your installed IDLE with

dnf install python3-idle
# ?

Hi thanks for response. I am using Anaconda Python as default Python. So I used idle3 included in Anaconda. I am not sure if this issue specific for Anaconda.

I will try use idle3 of Python3 Fedora

1 Like

Can your, please, just paste there a screenshot of this issue (what was entered, the output)?

PS: Do your know how to use “console” (terminal emulator)?

1 Like

Thanks for response. Yes, I know how to use 'console". I found the cause. The python in from Anaconda compiled with GCC 7.3.0 while the python in Fedora 31 compiled with GCC 9.2.1. They seemed not compatible. The result was idle3 from Anaconda can’t display Unicode while idle from Fedora 31 just work fine.

Idle in the left is of Fedora 31. The idle in the right is of Anaconda Python

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.