small patch for sftp urls

Robey Pointer robey at lag.net
Wed Nov 16 19:57:20 GMT 2005


On 15 Nov 2005, at 19:30, Martin Pool wrote:

> On 11 Nov 2005, Robey Pointer <robey at lag.net> wrote:
>>
>> It seems to be something weird in "bzr log" but I can't figure out
>> what.  Am I doing something obviously wrong? :)
>
> I can't see anything you did wrong.  Can you try to write a small test
> case or reproduction recipe that makes such a revision and runs log?

I'd forgotten about this! :)

After digging in more, there are actually two bugs involved:

1. Python 2.4 is no longer honoring locale settings on the Mac, but  
is always assuming the encoding should be "mac-roman".  This is a  
really dumb bug, but simple to work around by adding a 3-line hack.   
I'm not sure what to make of it, though.  It seems like such a crazy  
bug that I'm starting to doubt my own python configuration.

Is anyone else running python 2.4 on a mac?  Do you see this behavior  
too?

--- quote ---
$ LANG=en_US.UTF-8 python
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import locale
 >>> locale.getpreferredencoding()
'mac-roman'
--- /quote ---


2. Revision XML files are stored in UTF-8 (sorta...) but decoded into  
Latin-1.  I tried digging into this but was unable to figure it out.   
I'm starting to believe that the way we store unicode data:

<message>[erik b&#195;&#165;gfors]

... is actually incorrect.  I don't know much about XML, though.   
Does it maybe want non-entity literal UTF-8 there?  Does it want the  
special <?xml encoding?> tag that we never write?  Deep questions.

robey





More information about the bazaar mailing list