[PATCH 2 of 6] Determine default locale encoding and stdio encoding on start-up

Thomas Arendsen Hein thomas at intevation.de
Sun Nov 19 14:44:19 UTC 2006


* Andrey <grooz-work at gorodok.net> [20061119 12:34]:
> On 19 November 2006 (Sun) 03:15, Marcos Chaves wrote:
> > if this information helps, bzr crashes on my windows the way it
> > handles the encodings. For some reason, if I run:
> > > chcp
> >
> > Active code page: 0
> >
> > Then bzr tries to set codepage 'cp0' and crashes. Not sure why, since
> > locale.getpreferredencoding() gives me "cp1252", and
> > locale.getdefaultlocale() gives me "('pt_BR', 'cp1252')". Anyway, I
> > don't know how this works...
> 
> Looks like 'cp0' is what sys.stdout.encoding gives on your system. I am no 
> windows expert at all, but IIRC Windows has as setting called "code page for 
> non-Unicode programs" somewhere in Control Panel->Language Settings, and you 
> just have to find it and choose the preferred code page.

Problems like this are exactly why I think having a config setting
is important. According to the bzr code Andrey cited there were
problems on darwin, too.

Matt?

Thomas

-- 
Email: thomas at intevation.de
http://intevation.de/~thomas/



More information about the Mercurial-devel mailing list