Re: Just curious: who is using Pike for what?
Chris Angelico <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <CAPTjJmpborUC-jdtYy=Lekb0J=g-Eq8UGqaKb+0-AVP03r5kiQ@mail.gmail.com> |
On Thu, Dec 15, 2016 at 10:29 PM, Tobias S. Josefowitz <[email protected]> wrote: >>>> sz = "ß" >>>> sz.upper() == sz > True > > (python 2.7 apparently doesn't do this, not for me). In Python 2.7, what you have is a byte string, so you're probably trying to uppercase the UTF-8 byte sequence that represents that character. > Also while "ß" is generally mapped to "SS" when uppercasing in real > life (on signage etc), I personally would truly be shocked if a > programming language did that. Most of the time, in a programming > language, I would suppose people process strings, not text, and "ß" -> > "SS" pretty much only ever makes sense in text processing contexts. > I realize this issue might extend beyond the odd little "ß" character, > but as a native German speaker I can assure you I so far never had any > use for a function that would uppercase "ß" to "SS", while I depended > on upper_case() *not* doing that a lot. What do you mean by "strings, not text"? What are strings of if not text? I know the Pike 'string' type can be used to process arbitrary data - but then you wouldn't be uppercasing or lowercasing that data. > If there should be a need for such a functionality, it certainly > should be provided by an extra function, not handled by upper_case(). I can understand wanting an "ASCII-only case conversion" function as distinct from a "Unicode case conversion", but that's not what we have. What is it that you expect upper_case to do? ChrisA