Unicode education in Schools

Richard Wordingham via Unicode unicode at unicode.org
Sat Aug 26 16:07:57 CDT 2017


On Sat, 26 Aug 2017 21:20:45 +0300
Eli Zaretskii via Unicode <unicode at unicode.org> wrote:

> > Date: Sat, 26 Aug 2017 18:52:03 +0100
> > From: Richard Wordingham via Unicode <unicode at unicode.org>

> We are miscommunicating.  My point was that programming for MS-Windows
> needs a good understanding of what the UTF-16 surrogates are, and in
> what MS-Windows APIs/library functions they can and cannot be used.
> Without this understanding, one cannot figure out why the likes of
> iwspace and iswupper only support the BMP, and what APIs to use to
> lift this limitation.  Likewise with display-related APIs, used to
> display Unicode text.

> If you don't teach UTF-16 including these details, the programmers
> will feel lost when they meet with these complications.

So what's new compared to UTF-8?  The problem would be a misconception
that MSVC's wchar_t supported Unicode - or has that been fixed
recently?  The neutral message is to avoid wchar_t where possible.

C++11 and C11's char32_t ought to have fixed the problem.

Functions iswspace() and iswlower() are not stable, one really has to
replace them by the project's UCD routines.  For example, when the
locale is a Unicode locale with the obvious wchar_t representations, the
value of iswlower(0x13A0) recently changed from non-zero to zero, as
U+13A0 changed from gc=Lo to gc=Lu.  I don't think iswupper() is any
stabler.

Richard.


More information about the Unicode mailing list