Re: Java, UCS-2, and UTF

From: John O'Conner (
Date: Wed May 10 2000 - 15:12:59 EDT

> First of all, does anyone know how Java encodes its chars? I'm under the
> impression that it's UCS-2.

A Java char is a 16-bit value representing a single UTF-16 code point.

> Is it possible to send all 16-bit Java chars (converted directly to bytes
> without using a character converter) over the network and have another
> program successfully convert them to Unicode?

Sure, but you may have big-endian/little-endian issues.

> Is it required that they be
> put into a UTF format for transmission?


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