[issue4008] IDLE: checksyntax() doesn't support Unicode?

2009-01-02 Thread Pavel Kosina
Pavel Kosina g...@post.cz added the comment: I vote for fixing this too. This might be simplified/another example of above mentioned issues: # -*- coding: utf-8 -*- print (ěščřžýáíé) in IDLE prints this: ěščřžýáíé When running this script under python command line from another

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-12-29 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Here is a new patch that fixes this issue, and the duplicate issues (#4410, and #4623). It doesn't try to eliminate code duplication, but fixes coding_spec by decoding always to Latin-1 first until the coding is known. It fixes check_syntax

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-11-28 Thread Terry J. Reedy
Terry J. Reedy [EMAIL PROTECTED] added the comment: This is still a problem on my WinXP 3.0rc3 with # -*- coding: utf-8 -*- in a file but not with the same pasted directly into the shell Window. -- nosy: +tjreedy type: - crash ___ Python tracker

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-11-19 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: This patch has two problems: 1. saving files fails, since there is still a call left to the function coding_spec, but that function is removed. 2. if saving would work: it doesn't preserve the line endings of the original file when writing it

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-06 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11677/idle_encoding-2.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4008 ___

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-04 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: @loewis: I guess that your locale is still UTF-8. To refute this claim, I reported that locale.getpreferredencoding reports 'ANSI_X3.4-1968'. I was following your instructions exactly (on Debian 4.0), and still, it opens successfully (when

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-03 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: @loewis: I guess that your locale is still UTF-8. On Linux (Ubuntu Gutsy) using env -i DISPLAY=$DISPLAY HOME=$HOME xterm to get a new empty environment, I get: $ locale LANG= LC_ALL= LC_CTYPE=POSIX LC_NUMERIC=POSIX LC_TIME=POSIX

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-02 Thread STINNER Victor
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11673/idle_encoding.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4008 ___

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-02 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: Ah! tokenize has already a method detect_encoding(). My new patch uses it to avoid code duplication. Added file: http://bugs.python.org/file11677/idle_encoding-2.patch ___ Python tracker [EMAIL PROTECTED]

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-02 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Notice that there is also IOBinding.coding_spec. Not sure whether this or the one in tokenize is more correct. -- nosy: +loewis ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4008

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-02 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: loewis wrote: Notice that there is also IOBinding.coding_spec. Not sure whether this or the one in tokenize is more correct. Oh! IOBinding reimplement many features now available in Python like universal new line or function to write

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-02 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: Oh! IOBinding reimplement many features now available in Python like universal new line or function to write unicode strings to a file. It did not *re*implement. The implementation in IOBinding predates all other implementations out there.

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-02 Thread STINNER Victor
STINNER Victor [EMAIL PROTECTED] added the comment: @loewis: Ok, I didn't know. I think that it's better to reuse existing code. I also compared the implementations of encoding detection, and the code looks the same in IDLE and tokenize, but I prefer tokenize. tokenize.detect_encoding() has

[issue4008] IDLE: checksyntax() doesn't support Unicode?

2008-10-02 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: I can't reproduce the problem. It works fine for me, displaying the box drawing character. In case it matters, sys.getpreferredencoding returns 'ANSI_X3.4-1968'; this is on Linux, idle started from an xterm, r66761