Re: Unicode 3.0 CDROM - UTF8<->UCS2?

From: Mark Davis (markdavis@ispchannel.com)
Date: Wed Mar 22 2000 - 12:24:48 EST


In ftp://ftp.unicode.org/Public/PROGRAMS/CVTUTF/CVTUTF.H and the corresponding file on the CD-ROM there are the following:

ConversionResult ConvertUCS4toUTF16 (
                UCS4** sourceStart, const UCS4* sourceEnd,
                UTF16** targetStart, const UTF16* targetEnd);

ConversionResult ConvertUTF16toUCS4 (
                UTF16** sourceStart, UTF16* sourceEnd,
                UCS4** targetStart, const UCS4* targetEnd);

ConversionResult ConvertUTF16toUTF8 (
                UTF16** sourceStart, const UTF16* sourceEnd,
                UTF8** targetStart, const UTF8* targetEnd);

ConversionResult ConvertUTF8toUTF16 (
                UTF8** sourceStart, UTF8* sourceEnd,
                UTF16** targetStart, const UTF16* targetEnd);

ConversionResult ConvertUCS4toUTF8 (
                UCS4** sourceStart, const UCS4* sourceEnd,
                UTF8** targetStart, const UTF8* targetEnd);

ConversionResult ConvertUTF8toUCS4 (
                UTF8** sourceStart, UTF8* sourceEnd,
                UCS4** targetStart, const UCS4* targetEnd);

(The UCS-4 is actually UTF-32.) As far as conversion is concerned, UCS-2 and UTF-16 are identical. The only difference between them is the degree of support for surrogates in processes that interpret the data.

Mark

"Rogers, Paul" wrote:

> Just a quick silly question or two:
>
> On the subject CDROM, there are conversions for UCS4, UTF-7, etc. Where's a
> quick utility to convert between UCS-2 and UTF-8?
>
> I'm sure I'm missing something obvious here?
>
> Thanks for any/all pointers.
> --- Paul



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:00 EDT