bug-gnu-libiconv
[Top][All Lists]
Advanced

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

Re: [bug-gnu-libiconv] MS-ANSI query


From: Bruno Haible
Subject: Re: [bug-gnu-libiconv] MS-ANSI query
Date: Mon, 27 Apr 2009 23:31:31 +0200
User-agent: KMail/1.9.9

Hello,

There are three misunderstandings in your mail.

1) There is no encoding which is "the Windows ANSI encoding". You got
   fooled by Microsoft's misnomers. When they say "ANSI encoding", they
   mean a string stored as a sequence of bytes, in the encoding used
   for GUI programs. Which encoding this is, is system dependent. The
   encoding can be retrieved at runtime through the function GetACP():
   <http://msdn.microsoft.com/en-us/library/dd318070(VS.85).aspx>.
   The opposite of "ANSI encoding" is "wide string", for a string stored
   as a sequence of 16-bit units.

2) > iconv -f <charset> -t utf8 >more stuff

   There is no such encoding as 'utf8'. It is called 'utf-8' everywhere.
   (Upper/lowercase doesn't matter.)

3) > messages sent in the undistinguished "8BIT"

   Mail messages that contain non-ASCII characters (either through
   "Content-Transfer-Encoding: 8bit", or through quoted-printable, or
   through base64) should have a header line
     Content-Type: text/plain; charset=......
   This value of charset is the encoding that you should use as argument
   to iconv. (Except that when it says ISO-2022-JP, you better use
   ISO-2022-JP-2, and when it says ISO-8859-1, you better use WINDOWS-1252,
   and when it says GB2312 or GBK, you better use CP936. That's life.)

   If such a Content-Type header line is missing, it's guesswork.
   WINDOWS-1252 is probably a good guess in this case.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]