Re: [SLUG] localization

From: Dylan William Hardison (dylan@hardison.net)
Date: Mon Sep 15 2008 - 16:15:39 EDT


Spake Eben King on Monday, September 15, 2008 at 12:56PM -0400:
> On Mon, 15 Sep 2008, Dylan William Hardison wrote:
>
>> Spake Eben King on Monday, September 15, 2008 at 11:22AM -0400:
>>> I picked LANG=C for my shell environment so files would sort according to
>>> ASCII order, caps then lowers. But, non-ASCII characters such as ø
>>> (o-slash) in "Bjørk" appear as ? (question mark). If I tab-complete a
>>> filename, it is correct on the command line, but I can't type them in
>>> bash/sh. I can make it look right in ls by choosing LANG=en_US, but then
>>> sorting is all messed up, with caps and lowers sorting together. Is
>>> there a middle ground where things look correct and sort correctly?
>>> Bonus if it can be made to look right in Samba too.
>>
>> If you *just* want to sort in ascii order, you can set LC_COLLATE=POSIX.
>> e.g. export LC_COLLATE=POSIX.
>
> That does make it sort correctly (so does LC_ALL=C, BTW). It doesn't
> make ø show up, even when I do this:
>
> eben@pc:~/mp3/b$ env -i LC_COLLATE=POSIX ls
> BT Bizet Boston
> BT_+_Paul_van_Dyk Bj?rk Bowers,_Brian
> ...
>
> I'm guessing LC_ALL overrides the other LC_* settings?

I'd be interested in how the filenames are encoded -- are they UTF-8,
Latin-1, or what?

-- 
Knowledge, sir, should be free to all!
              -- Harry Mudd, "I, Mudd", stardate 4513.3
-
GPG Fingerprint: 1AD8 69DD F56A E7AB 421C  7D8A C66D 87D9 82CD 4AE4.
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS).  Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:57:08 EDT