Re: How to find out the character encoding?

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

 



On Wed, May 05, 2004 at 10:49:05PM +0200, Björn Persson wrote:
> What is the canonical way for a program to find out which character 
> encoding to use for standard input, standard output, command line 
> parameters, environment variables et cetera? One could look at the LANG 
> environment variable, but if no encoding is given there? Is ISO 8859-1 
> the default for all languages?

ISO 8859-1 is frequently not the default.  Typically you'll use a
combination of setlocale(3) and nl_langinfo(3) to learn about the
current locale.  The APPLICATION NOTES section of the utf-8(7) man page
covers this in somewhat more detail.

HTH,

Nalin



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux