UnicodeEncodeError in add_action_print with non ascii files names

John A Meinel john at arbash-meinel.com
Sat Feb 4 23:24:29 GMT 2006


Nir Soffer wrote:
> And here is the same errror in another place in the code:
> 
> $ bzr add Help/\327\247\327\250\327\220\ \327\220\327\225\327\252\327\231.*
> bzr: ERROR: exceptions.UnicodeDecodeError: 'ascii' codec can't decode
> byte 0xd7 in position 5: ordinal not in range(128)
>   at /opt/local/lib/python2.4/site-packages/bzrlib/commands.py line 484
>   in run_bzr
> 
> 
> This problem prevent me to use bzr for this project.
> 
> 
> On 5 Feb, 2006, at 0:27, Nir Soffer wrote:
> 
>> If you try to add an Hebrew file name, you get a traceback in bzr add:
>>
>> bzr add .
>> [sniped lot of added files...]
>> added bzr: ERROR: exceptions.UnicodeEncodeError: 'ascii' codec can't
>> encode characters in position 6-8: ordinal not in range(128)
>>   at /opt/local/lib/python2.4/site-packages/bzrlib/add.py line 61
>>   in add_action_print
>>
>> Usually code does not contain non ascii file names, but this file is
>> an Hebrew readme file, and it really matter if it is named קרא אותי or
>> ReadMe, specially for young users.
>>
>> bzr must support any file name.
>>
>>
>> Best Regards,
>>
>> Nir Soffer
>>
>>
> 
> Best Regards,
> 
> Nir Soffer

I have a branch which is specifically focusing on making unicode
filenames work. It is available from:
http://bzr.arbash-meinel.com/branches/bzr/encoding

However, it is not complete yet (not all command support everything that
they should).
I don't have a lot of time right now to work on it. But I try to get to
it when I can. (I've updated at least half of the commands to support
reading/writing to the screen properly, and I need to work on unicode
filenames. The tricky part with filenames is that Mac OSX (which I use)
normalizes unicode filenames in an odd way. So we need to be able to
re-normalize them internally.)

You can test out that branch to see how well it works. And if you want
to continue my work, I would be happy to review your changes and pull
them in.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060204/bc06b0b5/attachment.pgp 


More information about the bazaar mailing list