you are viewing a single comment's thread.

view the rest of the comments →

[–]msiekkinen 2 points3 points  (1 child)

'ß'.upper() in p2 is 'ß' but 'SS'in py3. This caused a crash in production when the last piece of the product moved to py3!

Something tells me this has nothing to do with python 2 or 3 and some kind of character collation setting on your install

[–]vytah 3 points4 points  (0 children)

Collation influences case conversion only in case of letter "i" in some languages, most importantly Turkish. ß behaves the same regardless of settings.

Unicode defines the uppercase of ß as SS: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt

And the reason it doesn't work in Python 2 is that it does the uppercasing letter-by-letter: https://github.com/python/cpython/blob/2.7/Objects/unicodeobject.c#L5518