[BUG] Unicode string must be always used with encodings

Alexander Belchenko bialix at ukr.net
Tue Sep 27 06:43:55 BST 2005


John A Meinel пишет:
> 
> So back to Alexander's comment. What is the actual error when you use 
> bzr to list those directories? So that we can track it down, and make 
> sure it works.

It is *almost* works, and in the latest 0.0.9 not fails, but works with bug:

E:\work\Python\pyastra>python
Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> import os
 >>> os.listdir(u'.')
[u'\u043f\u0440\u0438\u0432\u0435\u0442.txt', u'1.txt', u'fte.dsk']

E:\work\Python\pyastra>bzr init

E:\work\Python\pyastra>bzr st
unknown:
   1.txt
   fte.dsk
   яЁштхЄ.txt

E:\work\Python\pyastra>bzr add .
added "привет.txt"
added 1.txt
added fte.dsk

E:\work\Python\pyastra>bzr st
added:
   1.txt
   fte.dsk
   привет.txt
unknown:
   яЁштхЄ.txt

As you can see after adding all from directory it again list file with 
russian filename 'привет.txt' as correctly added file and as unknown one 
(in the wrong encoding 'яЁштхЄ.txt').

Alexander





More information about the bazaar mailing list