News for hackers. Stuff that matters.
Re:Strings – Dive Into Python 3 by moreati on Friday May 10, 2013 @01:51PM (#5687647)
A Friday challenge: In Python when is u'ß'.upper() equal to u'SS'?

I discovered one case today, there may be others. Answer: https://twitter.com/moreati/status/332910618858364928

Re:Strings – Dive Into Python 3 by safod on Friday May 10, 2013 @02:58PM (#5688013)
Actually, this is a bug. Unicode codepoint U+1E9E is LATIN CAPITAL LETTER SHARP S and should be the result of u"ß".upper(). This is especially so because otherwise u"Maße".upper() (Maße means measures) returns "MASSE", which could be confused with u"Masse".upper() (Masse means mass). In such cases, where confusion is possible and no uppercase ß is available, the German dictionary Duden actually suggests using SZ instead. Therefore, u"Maße".upper() would have to return "MASZE". However, since the Python string processing routines can hardly carry a dictionary around just to check whether there is a similar word that would have the same uppercase spelling, this is obviously not feasible. U+1E9E would be the way to go.
Re:Strings – Dive Into Python 3 by ygra on Friday May 10, 2013 @04:04PM (#5688387)
According to Unicode ß gets converted to SS in uppercase. This is by definition and doesn't change (stability policies, as far as I recall). Even in German you'll never see ß capitalised as SZ (except when I do it, but I'm a very, very small minority – and now I'm more likely to use ẞ).
Re:Strings – Dive Into Python 3 by kzrdude on Friday May 10, 2013 @02:56PM (#5687997)
And will it equal 'ẞ' in a later update? http://opentype.info/blog/2013/04/22/capital-sharp-s-in-use/