Show More
@@ -190,6 +190,11 b' def lower(s):' | |||||
190 | def upper(s): |
|
190 | def upper(s): | |
191 | "best-effort encoding-aware case-folding of local string s" |
|
191 | "best-effort encoding-aware case-folding of local string s" | |
192 | try: |
|
192 | try: | |
|
193 | s.decode('ascii') # throw exception for non-ASCII character | |||
|
194 | return s.upper() | |||
|
195 | except UnicodeDecodeError: | |||
|
196 | pass | |||
|
197 | try: | |||
193 | if isinstance(s, localstr): |
|
198 | if isinstance(s, localstr): | |
194 | u = s._utf8.decode("utf-8") |
|
199 | u = s._utf8.decode("utf-8") | |
195 | else: |
|
200 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now