Internationalisation of bzr cli

John Arbash Meinel john at arbash-meinel.com
Fri Apr 29 09:53:57 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/29/2011 11:44 AM, Alexander Belchenko wrote:
> Philippe Lhoste пишет:
>> On 29/04/2011 09:57, Alexander Belchenko wrote:
>>> If you want to work on it then please consider adding proper support
>>> for Windows as it
>>> done in QBzr and Bazaar Explorer (the basic idea available as small
>>> and separate project:
>>> https://launchpad.net/gettext-py-windows)
>>
>> Yes!
>> One, perhaps obvious, issue is where text is displayed/redirected on
>> Windows.
> 
> Last sprint I've talked with Martin about adding global command-line
> option --encoding to force specific encoding of output. I don't remember
> the resume on this.
> 
>> Well, I fear there is no good/real solution for this. Unless, perhaps
>> changing the charset of the console to UTF-8, which isn't obvious to
>> everybody (I know I can do that, I don't even recall how it can be
>> done...).
>> [... reaching the browser ...] That's chcp 65001
>> But Bazaar doesn't understand it. :-(
> 
> *Python* does not understand it. Bazaar is Python application and it
> heavily relies on what Python as platform provides.
> 
>> I noticed that at least Bzr 2.3 handle Unicode better than in the past.
> 
> Very strange. Really.
> 
> D:\Temp\BzrTest
>>  > chcp 65001
>> Page de codes active : 65001
>>
>> D:\Temp\BzrTest
>>  > bzr log -v
>> bzr: warning: unknown terminal encoding cp65001.
> 
> This error comes from Python. It has no knowledge about cp65001. Maybe
> bzr can add alias for this encoding to treat it as utf-8. Although in my
> experiments it's not possible to print anything correctly from python to
> console with such encoding. Again, Python as platform.
> 
>>   Using encoding cp1252 instead.

http://bugs.python.org/issue6058

Interestingly, one bit is:
> Note, however, that cp65001 is a pseudo code page:
> 
> http://www.postgresql.org/docs/faqs.FAQ_windows.html#2.6
> 
> 
> For instance, setlocale will not work:
> 
> http://blogs.msdn.com/michkap/archive/2006/03/13/550191.aspx

Which can certainly affect things. I don't know how much it would affect
us or not. It looks to be close to compatible, I would be fine with
something that said "if on Windows and encoding==65001, treat it as utf-8".

John
=:->


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk26irUACgkQJdeBCYSNAANNiQCgmcmHW4CJae+RarBfmLPX9l8X
NEkAnjNQvcvCO20zNM/ypbPEPMmXrgSh
=bFB7
-----END PGP SIGNATURE-----



More information about the bazaar mailing list