Re: Getting the system default charset

Jean-Marc Desperrier <[email protected]> Tue, 28 Jun 2005 08:58:51 +0200
Newsgroups gmane.comp.mozilla.internationalization
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Christian Biesinger wrote:
> [...] I think I want essentially 
> whatever nl_langinfo(CODESET) returns.
> 
> nsIPlatformCharset looks promising but does not seem to contain anything 
> for file _contents_ (only filenames).

I know no OS that supports a different value for the default filename 
charset and file content charset. The only place where it's more or less 
possible are the places where there's an API that returns you the 
filename directly in unicode, you don't need to convert.

The implementation of ns(I)PlatformCharset under Unix relies on 
nl_langinfo(CODESET).