user_encoding fix
Nir Soffer
nirs at freeshell.org
Fri Feb 17 07:17:33 GMT 2006
On 17 Feb, 2006, at 4:52, John A Meinel wrote:
> I thought on Mac we used the workaround:
>
> if sys.platform == 'darwin':
> sys.platform = 'posix'
> import locale
> sys.platform = 'darwin'
> else:
> import locale
>
> Which (in theory) gets bzrlib.user_encoding set to 'utf-8'. Which it
> seems to do for me. (But then again I have LANG=en_US.UTF-8 set in my
> .bashrc).
It does not work for me on 10.3. I also does not have any LANG
environment variable, and I don't know if it have any effect on 10.3. I
know that in 10.4 Apple did improve the local support, see
<http://developer.apple.com/documentation/CoreFoundation/Reference/
CFLocaleRef/Reference/reference.html#//apple_ref/doc/uid/20002069-CH2g-
BBCBIGCB>
What happen if you change your LANG to en_US.ASCII or another value -
does it work with the code above? Does the decoding test pass?
Maybe 10.3 should use always utf-8, while 10.4 should try to use the
locale?
What will happen when you checkout a branch that have names that can
not be encoded using your LANG settings?
Best Regards,
Nir Soffer
More information about the bazaar
mailing list