|
On 6/28/2011 3:02 AM, Dave Collins wrote:
Let's pretend we're waaaay overthinking this. Let's try this:v> print ("-" .. " is a hyphen")print ( ?? .. " is an n-dash")Without more information, we can only guess at what platform or software you are using. You need a UTF-8 aware editor, for starters, or you can use escaped character codes in strings.Well, the target platform is Win CE; I'm developing on XP. If I've got to worry about character sets then I'm just going to tell the design team they can't have en-dashes - they're getting hyphens.>:(
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.
I described the WinXP console as one usage scenario given the lack of information on your problem. Switching console code page is simply an easy way to see Unicode filenames on XP.
If you are printing ASCII or single-byte-single-character strings using Lua, then your API may be using 8-bit code page Win32 calls. So, it is possible on Win32 that your API calls may hamper display of Unicode characters, dunno if it's the same on Win CE.
So it all depends... good luck... -- Cheers, Kein-Hong Man (esq.) Kuala Lumpur, Malaysia