Skip to Content.
Sympa Menu

xom-interest - Re: Antwort: RE: Antwort: [XOM-interest] Character conversion problem

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: dvholten AT computer.org
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: Antwort: RE: Antwort: [XOM-interest] Character conversion problem
  • Date: Thu, 04 Nov 2004 06:43:13 -0500

dvholten AT computer.org wrote:

ok, i see - good point .

sure, xml supports characters wider than 2 bytes - but does java ??
having a valid xml-document doesnt mean, that anybody can actually process it.

after parsing the document, the attribute 'character="&#x50000;" ' is just
a java-string, limited to 2byte characters - i think.

No. Java strings can use surrogate pairs to access characters like this. A Java char is not a Unicode character. Rather it is a UTF-16 code point.

would be interesting to see, if *any* xsl-processor can make sense of that.
and it's sure, that there *really is* a character at x50000 ? - unicode has gaps.

Good question. You know what? I don't think 0x50000 is a Unicode character, and I don't mean it's not just a defined Unicode character. I mean it's not a Unicode character at all.

0x50000 is 5,242,880 in decimal. However Unicode is not a 32-bit code set. It's actually a 20 bit code set, and the maximum value is a little over one million so 0x50000 is out of range. Off the top of my head, I'm not sure what XOM and XML should do here. I'll have to explore this further.

--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page