------- Additional comments from kgoo...@dev.java.net Thu Feb 7 10:47:58 +0000 2008 -------
Comment by Radu Preotiuc [ 20/Dec/07 06:49 PM ]
Stefan is right, 0x0 is a valid Unicode character, but XML (even version 1.1)
does not allow it, citing "potential problems with APIs". On the other hand, XML
1.1 allows any other Unicode character. So using some above-XML level escape
just for this one character seems the wrong thing to do.
What would make sense to me is change the conversion rules from Character to
String, to map Character 0x0 to String "' (empty string). We are still left with
the problem of Strings containing the 0x0 character, but at that point I feel it
would be OK to say "not supported by SDO".
Comment by Stefan Bünnig [ 21/Dec/07 08:55 AM ]
Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] |
/* any Unicode character, excluding the surrogate blocks, FFFE, and FFFF. */
I agree to Radu that illegal characters in Strings shouldn't be supported in SDO.
If we keep 0x0 as the default value for characters, the representation as ""
(empty string) is also my best idea.
I think the best solution is to find a new default value for characters, e.g.
'0' (#x30) or ' ' (space, #x20), but I'm afraid, the most of you think it's to
late for that change. I know, it would be a breaking change but I'm sure that if
no one has noticed the serialization problem then no one would notice that change.