small patch for sftp urls

John A Meinel john at arbash-meinel.com
Thu Nov 17 02:23:14 GMT 2005


Robey Pointer wrote:
> 
> 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 ---

I see the same thing with python2.4, python2.3 seems to report utf-8 as
the preferred encoding.

> 
> 
> 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.

I would think it should use literal UTF-8. We should be hard coding the
writing and reading stages. What I wonder is if the initial grab of
Eric's name was incorrect.

John
=:->

> 
> robey
> 
> 
> 


-------------- 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/20051116/cda5371e/attachment.pgp 


More information about the bazaar mailing list