sanad added the comment:

These observations are noted when the system locale is set to 'iso-88591'

1. Ok, for some reason I'm able to execute this command without any error in 
Linux (idle window is opening with a file name as ''). Because the 
character '𝔼' is automatically being shown and treated as 'E' in both terminal 
and python command line interpreter(similar for chars '𝒵' = 'z' and '𝒫' = 'P').

2. But i'm unable to save/make a file with filname 'astral𝔼.py' and hence 
unable to run it. The following errors are thrown then : 

Exception in Tkinter callback
Traceback (most recent call last):
  File "/home/sanad/devpy/pessoc/cpython/Lib/tkinter/", line 1549, 
in __call__
    return self.func(*args)
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 176, 
in handler
    r = l[i](event)
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 339, 
in save
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 353, 
in save_as
    if self.writefile(filename):
  File "/home/sanad/devpy/pessoc/cpython/Lib/idlelib/", line 379, 
in writefile
    with open(filename, "wb") as f:
UnicodeEncodeError: 'ascii' codec can't encode character '\U0001d53c' in 
position 39: ordinal not in range(128)

I'm trying to figure out the root of the problem, feel free to give your inputs


Python tracker <>
Python-bugs-list mailing list

Reply via email to