Re: utf8u tag proposal

William Spitzak <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
BlueGM wrote:

> My point was simply that, the way it is worded, someone might read it and
> think that a "%%" will always be interpreted as "%%", but this won't be the
> case if it is followed by two hexadecimal digits. For example, "%%cat". If
> someone thought that "%%" was always "%%", then they might think this was
> going to be "%%cat" when, in fact, it is "\xCAat" (in double-quoted syntax).
> I understood, and agree with, your reasoning for allowing a "%" that isn't
> followed by two hexadecimal digits to be interpreted simply as "%". We just
> need to be careful about the way it is worded in the rationale.

Excellent point. Yes as designed (and in my implementation) "%%cat" 
turns into the 3 bytes '%',0xCA,'t' (I think you may have the same idea 
but mistyped what you wanted it to turn into).

An annoyance for describing this in the proposal is that "\xCA" means 
the UTF-8 encoding of the Unicode U+00CA character, not the byte 0xCA. 
It means the description probably should not use quoted string syntax 
but has to show bytes like I did to avoid ambiguity.

Possibly related but I think libyaml should be altered to output \u00NN 
for all Unicode between 0x80 and 0xFF, to avoid writing this ambiguous 
sequence, which will be parsed wrong by many programming languages. This 
would be compatible as it already accepts this on input.

Bill Spitzak
Rhythm & Hues

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.