Hi,

At Fri, 19 Oct 2007 16:59:17 +0900,
David Flanagan wrote in [ruby-core:12767]:
> But with -Ks or -Ke, it takes whatever codepoint you specify and
> translates it to the appropriate multibyte sequence for SJIS or EUC. (I
> don't know how to test this, however.)  If you run the parser in ASCII
> mode, then \u1234 is equivalent to \x12\x34.  Similarly for the \u{}
> form.  I don't know if this is actually a good idea or not.   There is a
> strong case to be made that \u should always create utf-8 bytes
> regardless of the encoding the parser is using.

For raw byte data, you can use \x.

If the current encoding is not based on the Unicode character
set, I think \u should:

a. raise compile error,
b. be converted from Unicode to the encoding, or
c. make the whole string UTF-8 encoding (and raise compile error
   if other non-ascii characters are there).

> +                       int maxbytes = rb_enc_mbmaxlen(parser->enc);
> +                       UChar buf[maxbytes];

C99 feature can't compile with C90 compilers.

-- 
Nobu Nakada