[issue4947] sys.stdout fails to use default encoding as advertised

2010-09-08 Thread STINNER Victor
STINNER Victor added the comment: I commited my patch (with a new test, iso-8859-1:replace) to 2.7: r84621. I will no backport to 2.6 because this branch now only accept security fixes. -- resolution: -> fixed status: open -> closed ___ Python trac

[issue4947] sys.stdout fails to use default encoding as advertised

2010-09-07 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +lemburg ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file18522/file_write-2.7-v2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread STINNER Victor
STINNER Victor added the comment: 3rd version of the patch: accept character buffer objects without reencoding them. Add also tests on character buffer objects. -- Added file: http://bugs.python.org/file18524/file_write-2.7-v3.patch ___ Python track

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread STINNER Victor
STINNER Victor added the comment: > Your patch threatens to break compatibility Yes it does. But I think that nobody relies on this bug. If your terminal uses something that utf-8, you will see strange characters if you write something else than ascii characters. I supopse that anybody facing

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your patch threatens to break compatibility. I think it would be better to simply change the "encoding" and "errors" attributes of standard streams. -- ___ Python tracker

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file18521/file_write-2.7.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to write that my patch uses also the errors attribute. Update the patch to add tests on errors: file_write-2.7-v2.patch. -- Added file: http://bugs.python.org/file18522/file_write-2.7-v2.patch ___ Pytho

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-14 Thread STINNER Victor
STINNER Victor added the comment: Attached patch fixes this old and annoying issue. The issue only concerns sys.std* files, because Python only set the encoding and errors attributes for these files. -- keywords: +patch versions: +Python 2.7 Added file: http://bugs.python.org/file1852

[issue4947] sys.stdout fails to use default encoding as advertised

2010-08-13 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue4947] sys.stdout fails to use default encoding as advertised

2010-06-09 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 2.4, Python 2.5 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4947] sys.stdout fails to use default encoding as advertised

2009-09-24 Thread Sridhar Ratnakumar
Changes by Sridhar Ratnakumar : -- nosy: +srid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue4947] sys.stdout fails to use default encoding as advertised

2009-07-28 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue4947] sys.stdout fails to use default encoding as advertised

2009-07-28 Thread Chris Rebert
Changes by Chris Rebert : -- nosy: +cvrebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4947] sys.stdout fails to use default encoding as advertised

2009-05-26 Thread Denilson Figueiredo de Sá
Changes by Denilson Figueiredo de Sá : -- nosy: +denilsonsa ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue4947] sys.stdout fails to use default encoding as advertised

2009-05-12 Thread Jan Kaliszewski
Changes by Jan Kaliszewski : -- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl ___ Python tracker ___ ___ Py

[issue4947] sys.stdout fails to use default encoding as advertised

2009-05-12 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: s / if File / in File s / -- works # <- is encoded with my_file.encoding / # <- is encoded with sys.stdout.encoding (sorry, too little sleep) -- ___ Python tracker ___

[issue4947] sys.stdout fails to use default encoding as advertised

2009-05-12 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: PS. The main problem is not a lack of feature but that inconsistency, and that's not documented if File type docs: print >>my_file, my_unicode # <- is encoded with my_file.encoding my_file.write(my_unicode) # <- is encoded with my_file.encoding # and on th

[issue4947] sys.stdout fails to use default encoding as advertised

2009-05-12 Thread Jan Kaliszewski
Jan Kaliszewski added the comment: The matter had been discussed (and not once...), IMO without satisfactory conclusion -- see: * http://bugs.python.org/issue612627 (the feature added) * http://bugs.python.org/issue1214889 (another feature rejected) * http://bugs.python.org/issue1099364 (probl

[issue4947] sys.stdout fails to use default encoding as advertised

2009-02-10 Thread sorin
Changes by sorin : -- nosy: +sorin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailma

[issue4947] sys.stdout fails to use default encoding as advertised

2009-02-04 Thread Qiangning Hong
Changes by Qiangning Hong : -- nosy: +hongqn ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4947] sys.stdout fails to use default encoding as advertised

2009-01-14 Thread Gabriel Genellina
Gabriel Genellina added the comment: > It probably uses sys.getdefaultencoding() instead. That would be wrong too, according to the cited documentation. file.encoding is a read only attribute; it can be set in C code using PyFile_SetEncoding. Apart from its definition in fileobject.c, it is

[issue4947] sys.stdout fails to use default encoding as advertised

2009-01-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: It probably uses sys.getdefaultencoding() instead. -- components: +Interpreter Core nosy: +pitrou priority: -> high type: -> behavior ___ Python tracker _

[issue4947] sys.stdout fails to use default encoding as advertised

2009-01-14 Thread Steven D'Aprano
New submission from Steven D'Aprano : Documentation for files states that when writing to a file, unicode strings are converted to byte strings using the encoding specified by file.encoding. http://docs.python.org/library/stdtypes.html#file.encoding sys.stdout is a file, but it does not behave