Mark Swanson wrote:
Raman Gupta wrote:
Mark Swanson wrote:
At this stage, when I serialize the response Document, I set its
responseDoc.documentProperties().setEncoding("UNICODEBIG"); I do this
because this is what the client sent me. I can only assume clients will
send me IANA character encodings, so I must respond in kind - a C#
client would be confused if it saw a Java-specific character encoding
name...

According to

http://www.iana.org/assignments/character-sets

UNICODEBIG is NOT a valid IANA character set name. UnicodeBig DOES
seem to be a java alias for UTF-16BE -- so that explains why it works
on the incoming side.

Interesting. I picked 'UNICODEBIG' from the source of Save.java - or was it EntryMapping.java - I'm off site atm and don't remember the filename exactly. The method was something like convertIANATojava() so I thought it actually contained valid IANA character encoding names.

FYI UnicodeBig is NOT the Java alias for UTF-16BE, it's UnicodeBigUnmarked:

I didn't say UnicodeBig was THE alias for UTF-16BE, I said it was AN alias for UTF-16BE. The IANA page does not (always) list java aliases for every character set.

charset:UTF-16BE
  alias:X-UTF-16BE
  alias:UnicodeBigUnmarked
  alias:UTF_16BE
  alias:ISO-10646-UCS-2

XmlBeans _only_ defines UNICODEBIG to correspond to UTF-16BE. So it still seems impossible to support UTF-16BE (IANA ISO-10646-UCS-2).

As I said above, UNICODEBIG is a java alias for UTF-16BE, so why shouldn't XmlBeans define this mapping?

NOTE: I initially tried (and would prefer) to use ISO-10646-UCS-2 as this is identical in IANA and Java. It does not work. No IANA/Java translation is required and XmlBeans still gets it wrong.

Why not just use UTF-16BE, which is the canonical IANA name for this character set? Does XmlBeans still have the wrong behavior, for either incoming or outgoing documents, if you specify UTF-16BE as the charset? If so, then I agree we have a bug.

This is a bug.

I'm not an XML beans developer, but I'm not sure I agree (unless, as I said there is a problem with specifying UTF-16BE). Though certainly there may be, and probably are, some mappings missing for certain IANA aliases.

Cheers,
Raman


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to