Subject: Re: CHARSET environment variable

From: Olivier Chapuis <[email-masked]>
Date: Sun, 3 Mar 2002 07:09:10 +0100

On Fri, Feb 01, 2002 at 11:16:18AM -0500, Dan Espen wrote:
> Olivier Chapuis <[email-masked]> writes:
> > On Thu, Jan 31, 2002 at 09:41:39PM -0500, Dan Espen wrote:
> > > 
> > > I have multibyte enabled.
> > > With the latest CVS I get this warning:
> > > 
> > > [FVWM][FInitCharset]: WARN -- Cannot get charset with CHARSET env variable
> > > 
> > > Where do I find the documentation on this env variable?
> > >
> > 
> > Hum, I do not know if there is a documentation somewhere. This variable
> > is used by some programs in the gnu world to get the charset associated
> > to your locale if your libc does not have nl_langinfo which can do the
> > job (it seems that you do not have nl_langinfo). It can also be used to
> > override the charset returned by nl_langinfo.
> > Now, it is not used in mb support but in the ewmh support for iconv
> > conversion from/to UTF-8 and your charset. If you have iconv
> > you can get the list of charsets by using "iconv --list".
> > There are multiple problems here:
> > 
> > 1 - FInitCharset is run by fvwm even if you do not have iconv
> > support (easy to fix).
> > 2 - nl_langinfo may return a different charset than the "X charset".
> > 3 - iconv is not an X function.
> > 
> > So nl_langinfo and iconv should not be used :o) but it does not
> > seem that there are obvious (portable) replacement (XFree >=4.0.2
> > has some Xutf8 functions, we may try to use if available).
> > I will try to fix these problems progressively. I begin to understand
> > the X i18n stuff. Any way these problems are small and these concern
> > only applications with ewmh support (but these should be fixed).
> 
> I looked at the various codesets iconv supports to try to figure out
> a default value.
>

Where do you find such information? I currently try to find some
info on locale stuff on various unix.
 
> It looks like if  CHARSET is not set,  is should default to ISO_8859-1
> (on Linux).
> 
> On Solaris and AIX, the default should be ISO8859-1.
> 
> On HPUX, it looks like it should be either "amere", "iso81", or "engle".
>

Strange, it seems that on HPUX the charset associated to a locale
(value returned by nl_langinfo) can be: iso88591, ..., iso885915,
roman8, arabic8, ..., kana8, tis620, big5, eucJP, eucKR, eucTW, hp15CN,
SJIS, utf8". So iconv on HPUX does not use its own charset ?!?

Olivier
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Olivier Chapuis <[email-masked]>
Date: Sun, 3 Mar 2002 11:13:17 +0100

> SJIS, utf8". So iconv on HPUX does not use its own charset ?!?

Ah ok,  amere ~ american_e and iso81 ~ iso88591 for HPUX iconv
("only the first four and the last letter are used").
Do HPUX iconv support "utf-8" ?
  
Olivier

---

From: Dan Espen <[email-masked]>
Date: Sun, 03 Mar 2002 07:09:41 -0500

> > > > On Thu, Jan 31, 2002 at 09:41:39PM -0500, Dan Espen wrote:
...
> > info on locale stuff on various unix.

I did "man iconv", noted any references to files, then poked around.
On HP, theres a directory named /usr/lib/nls/iconv/tables.

Its got files like this:

arab8=arabe
arab8=iso86
arabe=arab8
arabe=iso86
big5=chinte
big5=eucTW
...

which seem to be, transate arab8 to arabe, etc.

-- 
Dan Espen                           E-mail: [email-masked]
444 Hoes Lane  Room RRC 1C-214      Phone: (732) 699-5570
Piscataway, NJ 08854
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]