lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I suppose it has UTF-16, right? If you can output UTF-16 glyphs in 
whatever window interface you have, then you only need to put in 
the appropriate (double) bytes in a Lua string to pass onto 
whatever you are using to display text on your app. That's one 
scenario of the many possible ones.

Well, I have yet to find a description of how to actually output a code, or a list of what the codes are.

If this were HTML/JavaScript I would simply write: document.write("\u2013"). The character codes are listed like this (http://www.ascii.cl/htmlcodes.htm), and I simply write out the string.

If this were Visual Basic, I would simply write: print chr(150). The ASCII codes are listed like this (http://yorktown.cbe.wwu.edu/sandvig/docs/ASCIICodes.aspx), and I simply use the chr() function to print them.


My book tells me I can escape characters like this: \99, which outputs "c". Since "c" is 99 and [en dash] is 150, presumably I could simply type \150. But it does not work.

Dave