[Tutor] more encoding confusion
kent37 at tds.net
Sun Aug 5 20:37:01 CEST 2007
Jon Crump wrote:
> Kent, Many thanks again, and thanks too to Paul at
> That's very effective, thanks very much for the detailed explanation;
> however, I'm a little surprised that it's necessary. I would have
> thought that there would be some standard module that included a unicode
> equivalent of the builtin method isupper().
Hmm...actually, isupper() works fine on unicode strings:
In : s='H\303\211RON'.decode('utf-8')
In : print 'H\303\211RON'
In : s.isupper()
> I modified uppers to include only the latin characters, and added the
> apostrophe to catch placenames like L'ISLE.
Then you are back to needing a regular expression I think.
PS Please use Reply All to reply on-list.
More information about the Tutor