[q-lang-users] More Unicode queries.
Brought to you by:
agraef
From: Rob H. <hub...@gm...> - 2008-01-13 16:58:02
|
Dear Albert, Thanks for all the info in reply to my email back in November. Still on the subject of Unicode, I wondered if the documentation on Unicode strings could be clarified a little. In =A73.5 you describe how to encode characters. Your method is subtly different from that in the other languages I know. I was expecting something like "\U1234" for a Unicode character. Also, in some languages, the character encodings are of the form "\0377" and "\xFF" (of fixed length), and so it's easy to misread the Q documentation if familiar with such other klanguages. So the differences are: hex codes begin "\0x" rather than just "\x", and the numerals following the escape are read "hungrily", hence the need for parenthesis sometimes. Perhaps you could emphasise these differences, and also give some Unicode examples, such as: "Gr\(0x00E4)f" // although this is in Latin-1 too "Gr\(0xE4)f" "Infinity =3D \(0x221E)" "\(0x2202)f/\(0x2202)x" // partial "df/dx" (or some better ones). I prefer your method, by the way, to that in other languages. I particularly like the parenthesis. I think "\(0x1B)" looks very clear even when not required. Finally, can the Unicode characters also be escaped by name? Thanks, Rob. |