Null-terminated Unicode strings in on Windows

Roman Kennke roman at
Fri Jan 25 17:19:51 UTC 2008


> The specification is buggy
> in that it does not take into account the operating system interface 
> and makes correct memory management inefficient 
> for the benefit of sparing one byte per buffer 
> where an OS call is not needed.
> Ridiculous.

Tom Tromey pointed out another possible problem on IRC: What if the
string itself contains the 0? Unlikely, but possible in the Java world.

Cheers, Roman

More information about the core-libs-dev mailing list