Show More
@@ -336,8 +336,8 b' def toutf8b(s):' | |||
|
336 | 336 | return s._utf8 |
|
337 | 337 | |
|
338 | 338 | try: |
|
339 |
|
|
|
340 |
|
|
|
339 | s.decode('utf-8') | |
|
340 | return s | |
|
341 | 341 | except UnicodeDecodeError: |
|
342 | 342 | # surrogate-encode any characters that don't round-trip |
|
343 | 343 | s2 = s.decode('utf-8', 'ignore').encode('utf-8') |
General Comments 0
You need to be logged in to leave comments.
Login now