Skip to Content.
Sympa Menu

xom-interest - Re: Antwort: Re: [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: [XOM-interest] Character conversion problem
  • Date: Thu, 04 Nov 2004 09:13:55 -0500

dvholten AT computer.org wrote:


everybody looking at the same version ??

from my xom-sourcecode, it seems, that the UnicodeTextWriter never returns true from
method needsEscaping.
Then TextWriter.writePCDATA bypasses the surrogate-thing.
That comes from the default encoding (none given -> UTF8), other
encodings look good.


These methods are correct. No escaping is necessary when writing Unicode. needsEscaping() refers to whether or not it's necessary to use XML numeric character references to output a character because it does not exist in the chosen character set. The Unicode character set can output all characters in Unicode, naturally enough, so you never need to escape in these circumstances. This has nothing to do with surrogate pairs.


--
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