askq1 askq1 wrote:
> >From: "Pim Blokland" <[EMAIL PROTECTED]>
> 
> >However, you have said this is not what you want!
> >So what is it that you do want?
> 
> I want c/c++ code that will give me UTF8 byte sequence 
> representing a given code-point,
> UTF16 16 bits sequence reppresenting a given 
> code-point, UTF32 
> 32 bits sequence representing a given code-point.
> 
> e.g.
> 
> UTF8_Sequence CodePointToUTF8(Unichar codePoint)
> {
>     //I need this code
> }
> 
> UTF16_Sequence CodePointToUTF16(Unichar codePoint)
> {
>     //I need this code
> }
> 
> UCS2_Sequence CodePointToUCS2(Unichar codePoint)
> {
>     //I need this code
> }

Hint:

        #include "ConvertUTF.h"
        typedef UTF32 Unichar;
        typedef UTF8  UTF8_Sequence  [4 + 1];
        typedef UTF16 UTF16_Sequence [2 + 1];
        typedef UTF16 UCS2_Sequence  [1 + 1];

_ Marco

Reply via email to