From: David Flanagan Date: 2007-10-26T00:16:20+09:00 Subject: Re: \u escapes in string literals: proof of concept implementation Martin Duerst wrote: > At 17:05 07/10/25, Nobuyoshi Nakada wrote: > >> An additional patch to the previous one. With this patch, >> \x{...} means a codepoint in the given encoding, while \xXX >> means a raw byte as well as it's done now. > > This would mean that for UTF-8, \x{ABCD} and \u{ABCD} would > be the same? Some Perl people might like it, but I think it's > too confusing. Also, for other encodings, we have > "\xAB\xCD" == "\x{ABCD}" > so this is very thin syntactic sugar. I think that in a discussion > with Matz, we thought it wasn't necessary. > > Regards, Martin. > > > > #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University > #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp > > I don't like the fact that this proposed new \x{} escape has different meanings in different encodings. As an alternative to repeated \x strings that would be useful for long runs of binary data. (Though that then opens the door to a base-64 escape code, too.). I agree with Martin on this, that \x{ABCD} shouldn't produce different byte streams in different encodings. David