This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Why copy Utf8Consts?
- From: Per Bothner <per at bothner dot com>
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Cc: java at gcc dot gnu dot org
- Date: Sun, 17 Feb 2002 00:36:43 -0800
- Subject: Re: Why copy Utf8Consts?
- References: <3C6F6973.8000904@waitaki.otago.ac.nz>
Bryce McKinlay wrote:
> Why does _Jv_NewStringUtf8Const() copy the UTF8 data when initializing a
> String from a Utf8Const? Isn't a Utf8Const essentially a java string
> without the object/vtable header?
But the characters in a Utf8Const are in variable-width pseudo-UTF8
encoding. the characters in a Strin use UTF-16 - i.e. 16 bits per
character (ignoring surrogates).
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/