> >>The locale module has some things in this direction -- strxfrm and > >>strcoll, maybe? -- but I don't know what they do with unicode & doubt > >>they even exist on OS X. > > > Guido van Rossum wrote: > > IMO, locale and Unicode shouldn't be mentioned in the same sentence. > > At least the part of the locale that defines properties of characters > > is subsumed in Unicode in a way that doesn't require you to specify > > the locale. (Of course the locale is still important in defining > > things like conventions for formatting numbers and dates.) [MvL] > In particular, locale also matters for collation. So the desire to > collate Unicode strings properly is reasonable, but you need to know > what locale to use for collation. With Python's current locale model, > one would convert the Unicode string to the locale's encoding, and > then perform collation. Ouch. Seems you're right. > Of course, with an ICU wrapper, you could have multiple simultaneous > locales, and collate Unicode strings without converting them into byte > strings first. > > http://cvs.sourceforge.net/viewcvs.py/python-codecs/picu/ Is that something we could move into the std lib? --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4