[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Winapi - a minimal but useful Windows API binding
- From: Marc Balmer <marc@...>
- Date: Thu, 9 Jun 2011 18:30:14 +0200
Am 09.06.2011 um 18:24 schrieb Javier Guerra Giraldez:
> On Thu, Jun 9, 2011 at 11:15 AM, Marc Balmer <firstname.lastname@example.org> 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
> 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.
Right. There are free libs to calc the visible length of a UTF-8 string, fwiw.