Unicode error on Windows

John Arbash Meinel john at arbash-meinel.com
Thu Jul 9 15:17:26 BST 2009


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

Philippe Lhoste wrote:
> On 09/07/2009 04:06, Martin Pool wrote:
>> What do you think should happen when we have a character that can't be
>> shown on the console?  Maybe we should map it to '?' or similar?
> 
> The minimum I ask, of course, is no crash... :-)
...

> Ah, also:
> 
>> bzr add
> adding "A Bzr ? Test.txt"
> adding "B Bzr ? Test.txt"
> adding "C Bzr § Test.txt"
> 
>> bzr mv "A Bzr – Test.txt" "A Bzr -- Test.txt"
> A Bzr ? Test.txt => A Bzr -- Test.txt
> 
>> bzr mv "B Bzr ⁂ Test.txt" "B Bzr @ Test.txt"
> B Bzr ? Test.txt => B Bzr @ Test.txt
> 
>> bzr ls
> .bzrignore
> A Bzr -- Test.txt
> B Bzr @ Test.txt
> C Bzr § Test.txt
> 
> I used auto-completion above.
> Somehow, Bazaar still manage to correctly handle these files...
> 

So there is, in general, a *unicode* "write to the console" function in
Windows. Someone earlier proposed a possible patch to redirect our
writes to stdout to a wrapper that would use the appropriate function.

1) I'm happy to have us do something like that, though the specific
patch in question was doing it in the wrong places.
2) I'm concerned with what it will do for stuff like "bzr diff" that is
going to write the raw 8-bit characters from a file to stdout (these are
*not* Unicode characters.)

I would guess we should just do the work of creating a proper "UI"
output, which can then handle stuff like urls being formatted nicely, etc.

However, there may be a short-term fix which is easy enough to do.

I'll also say that getting Windows users a decent gui (either TBZR or
bzr-explorer at this point), can make getting unicode console support
moot, as they wouldn't really be using the console.

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

iEYEARECAAYFAkpV+/YACgkQJdeBCYSNAAMAPACeL94+i38CiW/RKSH9Lgqu33K4
UZoAn0ePQ+ptk0QwjAEASmVzvH2VEhGW
=lLmz
-----END PGP SIGNATURE-----



More information about the bazaar mailing list