[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Winapi - a minimal but useful Windows API binding
- From: Tom N Harris <telliamed@...>
- Date: Thu, 09 Jun 2011 20:49:28 -0400
On 06/09/2011 09:16 AM, steve donovan wrote:
Ah, but any plain ASCII is a degenerate (and valid) kind of UTF-8, so
I have the old problem of how to decide:
Quite apart from the 'plain C' part, the question in my mind is how to
decide when to use the current locate in the MultiByteToUnicode
Handle it like SciTE, perhaps. Lua can set the encoding for its strings
that will be used by all the functions. The default is UTF-8 (though I
imagine some users would benefit from CP_ACP). If you need to handle a
multi-byte string, do 'winapi.setcodepage(1251)'. And if you support
UCS-2 then strings can be passed to and from Windows without conversion.
Just please don't use the BOM.