[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting locale's charset from a script



Edmund GRIMLEY EVANS writes:

> > does, howerver (I supose any system with a working shell command "icon"
> > also has a working shell command "locale")
> 
> But if you get iconv by installing libiconv, you might not have a
> "locale" command.

If the 'iconv' command comes from libiconv, you can use
"iconv -f utf-8 -t char//TRANSLIT".  But with the standard glibc iconv
program you really need "iconv -f utf-8 -t `locale charmap`//TRANSLIT".

> The use of //TRANSLIT is a relatively new (and non-standard!) addition
> to iconv, so perhaps nobody noticed that it has the side-effect of
> making it less useful to omit the -t option. It would be good to have
> "iconv -f utf-8 -t //TRANSLIT" or "iconv -f utf-8 --translit" work,
> maybe.

I agree. Ulrich, do you consider to make one of the following work
in glibc?

   iconv -f utf-8 -t char//TRANSLIT

   iconv -f utf-8 -t //TRANSLIT

   iconv -f utf-8 --translit

Bruno
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/