lua-users home
lua-l archive

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

Chris Marrin wrote:
you could enter this:

     "This is a summation character: \226\136\145"

and a console that understood UTF8 would show a summation characer. But to do this I had to:

- Use to the Character Map utility to find the character
- Copy that character into OpenOffice, which understands Unicode
- Save the file as UTF8
- Open the file as binary in MsDev
- Hand convert the character sequence to UTF8
- Use Calculator to convert the result into decimal

It would be nice if Lua could do this for me :-)

Part of this process may be simplified using the right tools...
Perhaps something like BabelMap <> may help here. It is supposed to be able to save a Unicode sequence in UTF-8, although I am not sure if this works correctly (I get \U0001D6AA sequence, for example). But if you look at the properties of the highlighted character, it gives the UTF-8 sequence in hexa. A simple Lua program can convert it to decimal...

If you do this frequently, an automation tool like AutoIt or AutoHotkey can help too.

Note: the above software recommendations work only for Windows, but I suppose there are equivalent tools for other OSs.

Philippe Lhoste
--  (near) Paris -- France
--  --  --  --  --  --  --  --  --  --  --  --  --  --