|
From: Ram V. <ram...@gm...> - 2006-12-28 18:09:17
|
Hi Tony,
"UTF-16" alias is ambiguous, it can either be Big Endian or Little Endian.
To disambiguate ICU prepends a BOM on output. This is by design.
On 12/28/06, Tony Wu <wuy...@gm...> wrote:
>
> Hi all,
>
> The test below prints 0, 61.
>
> Charset c =com.ibm.icu4jni.charset.CharsetICU.forName("UTF-16");
> ByteBuffer buffer = c.encode(CharBuffer.wrap("aaaa"));
> System.out.println(Integer.toHexString(buffer.array()[0]));
> System.out.println(Integer.toHexString(buffer.array()[1]));
>
> I just want to confirm if the Encoder for utf-16 in icu4jni3.6 will
> encode with a BOM. Please correct me if I'm wrong. Great thanks.
>
--
Best Regards,
Ram Viswanadha
ICU
|