Re: Just curious: who is using Pike for what?
Chris Angelico <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAPTjJmrjmieOBo6v9m2sY0s3+TZRAAwvp6RDrw9Yuk4+0THSEw@mail.gmail.com> |
On Wed, Dec 14, 2016 at 11:30 PM, Peter Bortas @ Pike importmöte för mailinglistan <[email protected]> wrote: >>The Unicode spec doesn't say that case conversions have to be >>symmetrical. I don't particularly like the term "special", as it >>implies that it handles _only_ the special cases; can't we use >>"Unicode.upper_case"? In most situations, it's going to return the >>same thing that upper_case does, so the choice between the two would >>be down to whether you care about the string staying the same length, >>or about the strict conversions. > > Unicode.upper_case() is going to be confused with upper_case(). They will do the same thing in all cases except where the length would change. Personally, I would like upper_case to follow both sets of Unicode rules, and then have 8.0::upper_case that maintains backward compatibility. Then there's no confusion. > The choice would also be if you should apply locale specific > conversions. How does Python handle that? > Python doesn't. If Pike wants to, the Locale module would probably be the place for it. It'd be nice to be able to say "lower-case this string in the Turkish locale". The Unicode spec doesn't actually give us that data: """ To make case mapping language sensitive, the Unicode Standard specificially allows—but does not provide the necessary data—implementations to tailor the mappings for each language. """ So I'd be fine with a locale-independent mapping, which means (among other things) that "iıIİ" will lose information when case converted. ChrisA