lua-users home
lua-l archive

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


On Thu, Jun 9, 2011 at 11:15 AM, Marc Balmer <marc@msys.ch> wrote:
>> the other 128 codes are undefined, even if there are some 'codepages'
>> and such.  but they're not ASCII
>
> If you use codepages, the uppper 128 codes are well defined (and yes, they are not 7 bit ASCII).  I suggest to use Unicode internally and iconv to convert to the output medium charset.

my point (and i hope i'm not digressing too far from the original
point).  is that if a library specifie: "this parameter is UTF-8",
then you can say: "ok, i'll use ASCII", and you're safe... as long as
you use ONLY ASCII and not any codepage.   IOW: it's safe and correct
to say "use ASCII or UTF-8".  and nobody promises anything about
codepages.

IMHO, using (or even suggesting to use) codepages is going backwards.
if you need anything more than plain 7-bit ASCII (and who doesn't?)
then just use any decent editor to put UTF8 in the strings.   yes,
unfortunately that means you have to be extra careful with the
standard string library, especially about counting characters.

-- 
Javier