Re: (A Possible Solution) Re: preferred way to set encoding for print

2009-09-16 Thread Miles Kaufmann
On Sep 16, 2009, at 12:39 PM, ~flow wrote: so: how can i tell python, in a configuration or using a setting in sitecustomize.py, or similar, to use utf-8 as a default encoding? [snip Stdout_writer_with_ncrs solution] This should work: sys.stdout = io.TextIOWrapper(sys.stdout.buffer,

Re: (A Possible Solution) Re: preferred way to set encoding for print

2009-09-16 Thread Mark Tolonen
"~flow" wrote in message news:643ca91c-b81c-483c-a8af-65c93b593...@r33g2000vbp.googlegroups.com... On Sep 16, 7:16 am, "Mark Tolonen" wrote: Setting PYTHONIOENCODING overrides the encoding used for stdin/stdout/stderr (See the Python help for details), but if your terminal doesn't support t

Re: preferred way to set encoding for print

2009-09-16 Thread Terry Reedy
Mark Tolonen wrote: ('utf-8')`, but that has no effect in py3.0.1. also, i cannot set Even if not relevant to your immediate problem, if you can, upgrade to 3.1, with its many important bug fixes. -- http://mail.python.org/mailman/listinfo/python-list

(A Possible Solution) Re: preferred way to set encoding for print

2009-09-16 Thread ~flow
On Sep 16, 7:16 am, "Mark Tolonen" wrote: > Setting PYTHONIOENCODING overrides the encoding used for stdin/stdout/stderr > (See the Python help for details), but if your terminal doesn't support the > encoding that won't help. thx for these two tips. of course, that was a bit misleading by me to

Re: preferred way to set encoding for print

2009-09-15 Thread Mark Tolonen
"_wolf" wrote in message news:22991c72-d00f-45cd-9bf7-0b80fc431...@k26g2000vbp.googlegroups.com... hi folks, i am doing my first steps in the wonderful world of python 3. some things are good. some things have to be relearned. some things drive me crazy. sadly, i'm working on a windows box.

preferred way to set encoding for print

2009-09-15 Thread _wolf
hi folks, i am doing my first steps in the wonderful world of python 3. some things are good. some things have to be relearned. some things drive me crazy. sadly, i'm working on a windows box. which, in germany, entails that python thinks it to be a good idea to take cp1252 as the default encodi