W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2002

Re: Checking a UTF-16 instance against a UTF-8 Schema

From: DESEYNE Jacques <jacques.deseyne@swift.com>
Date: Tue, 02 Jul 2002 10:52:19 +0200
To: Mark Feblowitz <mfeblowitz@frictionless.com>, xmlschema-dev@w3.org
Message-id: <3D2169C3.DDA03A9A@swift.com>

Both Schema and instance are, of course, XML documents, so I would expect that any decent parser implementing the rules as given in
the XML Specification (Section 4.3.3) handles this without a glitch.

Indicating the encoding of a document or external entity can be done in several ways: indicating the encoding in the XML or Text
Declaration, as a parameter of the InputSource, using a Byte Order Mark.
Both Xerces-J 2.0.0 and Turbo XML (nothing meant to be normative, these two happen to be installed on this machine) are
happy with an instance in UTF-16 (with a Byte Order Mark) and a Schema in UTF-8, without any encoding declaration.

Note that accented French can be represented in UTF-8 encoding -- both UTF-8 and UTF-16 allow to encode the whole Unicode character

Best regards,


Mark Feblowitz wrote:

> Probably a FAQ, but not one I've encountered.
> Can all available validating parsers validate an XML instance represented in
> UTF-16 against an XML Schema represented in UTF-8?
> Would anything special need to be done to achieve the validation, or would
> it suffice for each of them to have their encodings appropriately indicated?
> The intent here is to use a given Schema, represented in UTF-8, to validate
> an instance document that uses the same element and attribute labels, yet
> the element and/or attribute content requires UTF-16, e.g., strings
> containing accented French.
> Anything special I need to be aware of?
> Thanks,
> Mark
> Mark Feblowitz
> XML Architect
>        [t]   617.715.7231
>        [f]   617.495.0188
> Frictionless Commerce Incorporated
>        [e]  mfeblowitz@frictionless.com <mailto:mfeblowitz@frictionless.com>
>        [w] http://www.frictionless.com <http://www.frictionless.com>
>        [m] 400 Technology Square, 9th Floor
>              Cambridge, MA 02139
> Open Applications Group Incorporated
>        [e]  mfeblowitz@openapplications.org
> <mailto:mfeblowitz@openapplications.org>
>        [w] http://www.openapplications.org <http://www.openapplications.org>

Jacques Deseyne
Technical Authority, SWIFTAlliance WebStation Development Team
IT/Interfaces Dept.
Society for Worldwide Interbank Financial Telecommunication (S.W.I.F.T.)
Avenue Adele 1, B-1310 La Hulpe
Tel: +32 2 655 3111

This e-mail and any attachments thereto may contain information that is
confidential and/or proprietary and is intended for the sole use of
the recipient(s) named above. It is not intended to create or affect
any contractual arrangements between the parties. If you have received
this e-mail by mistake, please notify the sender and delete it immediately.
Thank you for your cooperation.
Received on Tuesday, 2 July 2002 04:52:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:03 UTC