On Tuesday, July 08, 2003 12:49 PM, santhosh kumar <[EMAIL PROTECTED]> wrote:

> Hello,
>       I am new to this group. Now  I am working in OBEX profile
> design in Windows platform. I have some issues with XML parsing.
> According to XML the default encoding scheme is UTF-8. But I want to
> convert it in to UTF16-LE. Can anyone tell me how to convert UTF-8 to
> UTF-16LE . 
> 
> Santhosh.

Additionally the Java SDK provides the "native2ascii" tool that can also
to this conversion:

    native2ascii -encoding UTF-8 < source.xml |
    native2ascii -reverse -encoding UTF-16LE > target.xml

(The intermediate conversion produces the "\uXXXX" hexadecimal
sequences in Java String notation, using UTF-16 surrogates if needed
for UTF-8 sequences longer than 3 bytes, and uses a "\\" pair to
escape ASCII backslashes)


Reply via email to