[DFDL-WG] Clarification/Issue - is UCS-2 an encoding

Mike Beckerle mbeckerle.dfdl at gmail.com
Tue Dec 4 13:16:22 EST 2012


The encoding name "UCS-2" is used several times in the specification.

This is not an IANA encoding name. What is intended is ISO-10646-UCS-2. A
note in the IANA character set list notes that this encoding doesn't
specify byte order but that it is needed. However, there are no endian
variants for this encoding as there are with UTF-16 (UTF-16BE and
UTF-16LE).

I suggest we remove all mention of UCS-2 from the spec, and use UTF-16
instead. The byte-order issues for UTF-16 are already discussed.

This requires changing the description of utf16Width property as follows:

Section 11: utf16Width

Replace paragraph begining with "Specifies..." by this:

Specifies whether the encoding 'UTF-16' should be treated as a fixed or
variable-width encoding. 'UTF-16' is potentially a variable width encoding
using either 2-byte codepoints, or matched surrogate-pair codepoints
containing two adjacent 2-byte codepoints that are combined to compute the
character code. However, it is historically common for users to specify
'UTF-16' when they mean the fixed-width subset which does not allow use of
the surrogate pairs. When utf16Width='variable', then surrogate pairs are
expected and assumed to encode a single character. When utf16Width='fixed',
then surrogate pair codepoints are treated as individual character codes.

Section 12.3.7.1.1 Character Width

Remove "(e.g., UCS-2)" from table, replace with "(e.g., UTF-16 with
dfdl:utf16Width='fixed')".
Replace "variable (e.g., Shift_JIS, UTF-8, UTF-16)" with "variable (e.g.,
Shift_JIS, UTF-8, UTF-16 with dfdl:utf16Width='variable')"


-- 
Mike Beckerle | OGF DFDL WG Co-Chair | Tresys Technologies
Tel:  781-330-0412
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20121204/5abe86a5/attachment.html>


More information about the dfdl-wg mailing list