- Subject: Re: iconv module documentation or examples?
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Sun, 31 Aug 2008 12:14:57 -0400
Jörg Sommer <joerg@xxxxxxxxxxxx> wrote:
> What's with LC_ALL and LC_CTYPE?
By this, I assume that you mean that the function should be changed to
something like:
define get_encoding ()
{
if (_slang_utf8_ok) return "UTF-8";
foreach (["LC_ALL", "LC_CTYPE", "LANG"])
{
variable env = ();
variable lang = getenv (env);
if (lang == NULL)
continue;
variable fields = strchop (lang, '.', 0);
if (length (fields) >= 2)
return strchop (fields[1], '@', 0)[0];
}
return NULL;
}
Thanks,
--John
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2008 date index]
[2008 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]