A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-November/050155.html below:

[Python-Dev] File encodings

[Python-Dev] File encodings [Python-Dev] File encodingsGustavo Niemeyer niemeyer at conectiva.com
Tue Nov 30 18:11:53 CET 2004
Hello Walter,

> >I don't see that as a good solution, since every Python software
> >that is internationalizaed will have do figure out this wrapping,
> >introducing extra overhead unnecessarily.
> 
> This wrapping is probably necessary for stateful encodings. If you
> had a sys.stdout.encoding=="utf-16", print would probably add the
> BOM every time a unicode object is printed. This doesn't happen if
> you wrap sys.stdout in a StreamWriter.

I'm not sure this is an issue for a terminal output stream, which
is the case I'm trying to find a solution for. Otherwise, Python
would already be in trouble for using this scheme in the print
statement. Can you show an example of the print statement not
working?

-- 
Gustavo Niemeyer
http://niemeyer.net
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4