Re: Need encoding conversion routines

From: Pim Blokland (pblokland@planet.nl)
Date: Fri Mar 14 2003 - 06:30:44 EST

  • Next message: askq1 askq1: "Re: Need encoding conversion routines"

    askq1 askq1 schreef:

    > In particular I need source code (or some way) for following
    requirements:
    > - Convert Unicode code-point to UTF8 encoding and vice-versa.
    > - Convert Unicode code-point to UCS2 encoding and vice-versa.
    > - Convert Unicode code-point to UTF16 encoding and vice-versa.

    Ahem. Unicode *IS* UTF-8, UTF-16 and UCS-2. For instance, codepoint
    U+4321 has the value (hex) 4321, which is defined as its Unicode
    value. This is the same in any encoding. So I'm not sure what you
    want. If the C routines at
    http://www.unicode.org/Public/PROGRAMS/CVTUTF/ don't do it for you,
    which conversion do you need? LE byte order to BE and back?
    Canonical decomposing? Fallback character substitutions? BOM
    insertion? What?

    Pim Blokland



    This archive was generated by hypermail 2.1.5 : Fri Mar 14 2003 - 07:10:30 EST