Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #100596
| From | eryk sun <eryksun@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Should stdlib files contain 'narrow non breaking space' U+202F? |
| Date | 2015-12-18 04:35 -0600 |
| Message-ID | <mailman.53.1450434985.30845.python-list@python.org> (permalink) |
| References | <n4vf3d$rer$1@ger.gmane.org> <CAPTjJmoa5dBiDJ5zDu4jEy4MjOm6vp=J3zLqJw7ZfEUf9da=DQ@mail.gmail.com> <mailman.41.1450396996.30845.python-list@python.org> <5673d713$0$1612$c3e8da3$5496439d@news.astraweb.com> |
On Fri, Dec 18, 2015 at 3:51 AM, Steven D'Aprano <steve@pearwood.info> wrote: > On Fri, 18 Dec 2015 11:02 am, Mark Lawrence wrote: > >> A lot of it is down to Windows, as the actual complaint is:- >> >> six.print_(source) > > Looks like a bug in six to me. > > See, without Unicode comments in the std lib, you never would have found > that bug. I think Mark said he's piping the output. In this case it's not looking at the current console/terminal encoding. Instead it defaults to the platform's preferred encoding. On Windows that's the system ANSI encoding, such as codepage 1252. You can set PYTHONIOENCODING=UTF-8 to override this for stdin, stdout, and stderr.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Should stdlib files contain 'narrow non breaking space' U+202F? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-12-18 00:02 +0000
Re: Should stdlib files contain 'narrow non breaking space' U+202F? Steven D'Aprano <steve@pearwood.info> - 2015-12-18 20:51 +1100
Re: Should stdlib files contain 'narrow non breaking space' U+202F? eryk sun <eryksun@gmail.com> - 2015-12-18 04:35 -0600
csiph-web