John Joyce
7/10/2008 1:25:00 AM
On Jul 9, 2008, at 8:17 PM, Stefan Schmidt wrote:
>> The document for String#upcase says:
>
> Yes, sorry, I should have read the documentation
>
>> See "Note:". Tim Bray have persuaded me to do so, since case
>> conversion outside of ASCII region is highly dependent on country,
>> language, culture and script.
>
> So basically the Python guys are going down a wrong route ?
>
> # -*- coding: utf-8 -*-
> import string
> print string.upper(u"aoue=E4=F6=FC=E9")
> print string.lower(u"AOUE=C4=D6=DC=C9")
>
> works as expected.
>
> Cheers, Stefan
>
No.
They're going down a different route.
Seriously, the language handling is something that could easily be =20
handled by extensions. It does not need to be a core part of the =20
language.
Even operating systems handle these things with proprietary and very =20
sophisticated techniques based on the language in question.
In most cases, what you are expecting to be the correct upper case =20
characters may be 'correct' but it will ultimately depend on the =20
language and the context.=