bzr: warning: unknown encoding

John Arbash Meinel john at arbash-meinel.com
Wed Mar 12 16:22:00 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Angela wrote:
| On Wed, Mar 12, 2008 at 7:18 AM, Harald Meland
| <harald.meland at usit.uio.no <mailto:harald.meland at usit.uio.no>> wrote:
|
|     [John Arbash Meinel]
|
|      > I don't know that the actual value matters a whole lot,
|
|     I was under the impression that it does, actually.  You can select any
|     one of the installed locales, as listed by "locale -a"; but if you try
|     to use a value that isn't among your installed locales, all bets are
|     off:
|
|
| Thanks, everyone, for your inputs. I tried a lot of possible values for
| $LANG, to no avail:
|
| LANG="en_US.UTF-8"
| LC_COLLATE="en_US.UTF-8"
| LC_CTYPE="UTF-8"

^-- This looks odd to me. I would think CTYPE should match the rest. When I do:

LC_CTYPE="UTF-8" python -c "import locale; locale.getpreferredencoding()"

it breaks for me.


| LC_MESSAGES="en_US.UTF-8"
| LC_MONETARY="en_US.UTF-8"
| LC_NUMERIC="en_US.UTF-8"
| LC_TIME="en_US.UTF-8"
| LC_ALL=
|

...

| (I only set $LANG, but apparently everything else gets set when I do.
| I'm not sure if it's normal behavior or not, but there you go.)
|
| All those combinations don't work. I do have "en", "en_US", "en_GB"
| installed. Partial output of locale -a is:
|
| en_GB
| en_GB.ISO8859-1
| en_GB.ISO8859-15
| en_GB.US-ASCII
| en_GB.UTF-8
| ...
| en_US
| en_US.ISO8859-1
| en_US.ISO8859-15
| en_US.US-ASCII
| en_US.UTF-8
|
| I don't see any standalone "en", but I do see a standalone "C". However,
| that last one still doesn't work.
|
| Any ideas? Thanks!

Well, that would hint to me that "en_US.UTF-8" should work.

I don't know what is setting LC_CTYPE, but I wonder if it isn't being carried
over from your environment. You might try using

unset LC_CTYPE

or possibly setting both "LANG=en_US.UTF-8" and "LC_CTYPE=en_US.UTF-8".

The simple check is to just run:

python -c "import locale; print locale.getpreferredencoding()"

That should print out "UTF-8". If it fails with an exception, then it is
triggering the same thing which is causing bzrlib to fall back to ASCII.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH2AMoJdeBCYSNAAMRAsL6AJ9kLsIkVWv75Z6Xxsy7L9nuF+cIbQCfW99d
JNrTaNqXj/u3wNdzHDlsGAE=
=aG1N
-----END PGP SIGNATURE-----



More information about the bazaar mailing list