cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
Subject Re: [d'oh!] java APIs are not powerful enough to handle the XML spec!!
Date Thu, 13 Nov 2003 18:25:37 GMT
Stefano Mazzocchi wrote:

> The day somebody asks you why java needs to be replaced, one answer 
> will be 'it only supports 16-bits chars'. laughable as it might seem, 
> it's true.
> yes, people, a Unicode char is not 16 bit (as I always though!) but 32!!
> And even the XML specification says so.
> Char ::=  #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | 
> [#x10000-#x10FFFF]
> do the math and you find that #x10000 cannot fit in 16 bits!
> now, if you thought you could take the character() SAX event and 
> create a String out of it and do something useful with is (like print 
> it, for example), forget it. The result will very likely not be the 
> one you expect.
> Another reason not to use Stings at all.

What are Strings but a char[] wrapped into an object? How is it 
different from the char[] given by characters() ?


Sylvain Wallez                                  Anyware Technologies 
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }
Orixo, the opensource XML business alliance  -

View raw message