Null-terminated Unicode strings in on Windows

Tim Bell Tim.Bell at Sun.COM
Mon Jan 21 22:45:06 UTC 2008

Alan Bateman wrote (about GetStringChars):

> [...] is length+1 and zero terminated. There is a long-standing bug to clarify the JNI specification on this topic. I believe it should say that the returned array of Unicode characters is not required to be zero terminated and that one should use GetStringLength to determine the length.

Roman Kennke wrote:

> So this is indeed a bug, right? Do you think it makes sense to go out and fix it?

I'd start here:

   4616318 Spec for JNI's GetStringChars() is incomplete

HTH - Tim

More information about the core-libs-dev mailing list