Terry J. Reedy added the comment:
From msg248192 (Serhiy - which
...
File /home/serhiy/py/cpython/Lib/idlelib/EditorWindow.py, line 899, in
update_recent_files_list
if '\0' in path or not os.path.exists(path[0:-1]):
File /home/serhiy/py/cpython/Lib/genericpath.py, line 19, in exists
Roundup Robot added the comment:
New changeset d54aa163e4ec by Terry Jan Reedy in branch '2.7':
Issue #23672: ACKS
https://hg.python.org/cpython/rev/d54aa163e4ec
New changeset c1031eb12aa1 by Terry Jan Reedy in branch '3.4':
Issue #23672: ACKS
https://hg.python.org/cpython/rev/c1031eb12aa1
Terry J. Reedy added the comment:
It appears that the failures in msg248192 and msg248365 are issues with
non-latin1 chars in general, not with astral chars in particular. Anyone who
wants filenames with astral chars should be using a utf-8 locale.
This issue is about Idle working around the
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 'astralE.py'). Because the
character '피' is automatically being
Serhiy Storchaka added the comment:
Interesting, this doesn't work with non-UTF-8 locale.
$ touch astral피.py
$ LC_ALL=en_US.iso88591 ./python -m idlelib.idle -e astral피.py
Traceback (most recent call last):
File /home/serhiy/py/cpython/Lib/runpy.py, line 170, in _run_module_as_main
sanad added the comment:
Hey Terry, after testing the committed patch on my Linux Mint, I have found the
following behaviour:
1. The issue of IDLE not starting when Recent File list has name outside BMP
has been fixed.
2. The File Name is correctly formatted and displayed in the file editor
Terry J. Reedy added the comment:
I made a different fix for avoid the error posted when running. Sanad, PLEASE
test running a file with astral char, the same way you did before, to see is
there are any other problems. I cannot get such a file into an Idle editor on
Windows. I *think* this
Roundup Robot added the comment:
New changeset dda625798111 by Terry Jan Reedy in branch '3.4':
Issue #23672: Allow Idle to edit and run files with astral chars in name.
https://hg.python.org/cpython/rev/dda625798111
New changeset 97d50e6247e1 by Terry Jan Reedy in branch '3.5':
Issue
Terry J. Reedy added the comment:
The problem with astral chars and open/save dialogs is the subject of #21084.
The problem with printing astral chars generated by programs is #22742 and
maybe #21084. I added a fix for the very new display of filenames on the run
separator bar, which is the
sanad added the comment:
On the lines of changes proposed by Terry and others in the comments, this is
the patch I'm submitting.
The function _filename_to_unicode() plays the major part in the plot. The
function can get two types of filename ,'str' and 'bytes'. When its str, all
the astral
sanad added the comment:
Correction:
This patch fixes the problem of idle not opening when recent file list has
filenames outside BMP and the crashing of idle on using filenames with astral
characters.
The added benefit is that you can create a file with such chars and save it and
access it
Terry J. Reedy added the comment:
_filename_to_unicode returns unicode names as is. In 3.x, are filenames ever
not unicode? They come from either a file dialog (via tk, hence unicode), or
sys.argv. I do not know about the latter, which is possibly OS-dependent.
This function is used in
Ned Deily added the comment:
At least on some platforms (e.g. OS X), it is easy to create files with
legitimate names containing code points above the BMP limit (= U+)
currently imposed by Tcl/Tk. For IDLE 3, I suspect _filename_to_unicode() in
EditorWindow could be modified to check for
Changes by Ned Deily n...@acm.org:
--
nosy: +roger.serwy, terry.reedy -ned.deily
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23672
___
___
Terry J. Reedy added the comment:
The full path of a file being edited also ends up in the title bar and the
Window menu. I do not know whether the title bar is displayed by tk or the OS
(Windows obviously displays the title of taskbar icons) but the Window list is
definitely by tk. It
Terry J. Reedy added the comment:
Thinking more, there are two issue here. One is the fact that Idle stops when
fed a filename with astral chars. This *is* a bug and should be fixed in all
versions, even if that fix is to display a message box saying that Idle cannot
work properly with such
Changes by Raymond Hettinger raymond.hettin...@gmail.com:
--
priority: normal - high
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23672
___
___
17 matches
Mail list logo