This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why copy Utf8Consts?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]