[MPlayer-dev-eng] [PATCH] Convert UCS-2LE encoded asf tag

Nicolas George nicolas.george at ens.fr
Thu Aug 24 19:46:49 CEST 2006


Le septidi 7 fructidor, an CCXIV, Rich Felker a écrit :
>		   If we really need to support systems without iconv,
> we could make a fake iconv that first converts UTF-8 to UTF-32 then
> uses the ISO C multibyte functions to convert to the local encoding
> for display...

Beware: there is no guarantee that the C wchar_t coding is the Unicode
codepoint (which is the same as UTF-32). You could decree that any system
where it is not true is just braindead, and I would agree. But that makes
Solaris¹, for example, braindead, and stopping to support it would require
at least some thought; Solaris has a reasonably working iconv, though.


1: in UTF-8 locales, the wchar_t value corresponding to an Unicode character
is indeed its codepoint, but in legacy 8-bit locales, the wchar_t value for
the character with code c >= 0x80 is 0x30000000 | (c & 0x7F). Which means
that the very same character has different wchar_t values in different
locales.


Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20060824/c3260b83/attachment.pgp>


More information about the MPlayer-dev-eng mailing list