[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Winapi - a minimal but useful Windows API binding
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 9 Jun 2011 15:16:11 +0200
On Thu, Jun 9, 2011 at 1:29 PM, Patrick Rapin <toupie300@gmail.com> wrote:
> A good trade-off rule would be: if a string is a valid UTF-8 string,
> assume it is UTF-8; otherwise assume it is encoded in the current
> locale.
Ah, but any plain ASCII is a degenerate (and valid) kind of UTF-8, so
I have the old problem of how to decide:
http://stackoverflow.com/questions/1031645/how-to-detect-utf-8-in-plain-c
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
conversion functions.
steve d.