Experiences/guidance on teaching Python as a first programming language

Chris Angelico rosuav at gmail.com
Sat Dec 14 09:15:00 EST 2013


On Sun, Dec 15, 2013 at 1:03 AM,  <wxjmfauth at gmail.com> wrote:
> D:\>chcp 65001
> Page de codes active : 65001
> D:\>echo "*"
> "*"
> D:\>
>
>
>>>> locale.getdefaultlocale()
> ('fr_CH', 'cp1252')
>
> ----------
>
> In my understanding and experience, in the MS world
> (desktop, intel), today:
> Unicode == utf-16-le

You still haven't explained how Win7 is different from every other
Windows going back as far as NT. Back in the NT days, Windows had
"Unicode" (really UCS-2 - it predated Unicode 2.0, so that was correct
for a few years) while OS/2 had DBCS. Hindsight shows that OS/2 did
kinda get left behind there :) Though maybe it would be easier to
force migration from DBCS to true Unicode than from UTF-16 or UCS-2
where it looks fine till you hit an astral character. Now how is Win7
different from NT? And where does the current "oldstable" Windows (if
I may borrow a term from Debian), XP, fit into that?

> If you think, utf-16, because of surrogate pairs, is
> not a proper solution, the single choice is utf-32.
>
> You may not be aware, you are already using utf-32
> probably much more than you think, (in a correct way).

Yeah. I use UTF-32 a lot, often stored in ways that elide unnecessary
00 bytes. It's a pretty good system, actually, giving high
performance, compact memory usage, and correct behaviour. Still don't
know what this has to do with Win7.

ChrisA



More information about the Python-list mailing list