Show More
@@ -458,9 +458,9 b' def getutf8char(s, pos):' | |||||
458 | ''' |
|
458 | ''' | |
459 |
|
459 | |||
460 | # find how many bytes to attempt decoding from first nibble |
|
460 | # find how many bytes to attempt decoding from first nibble | |
461 | l = _utf8len[ord(s[pos]) >> 4] |
|
461 | l = _utf8len[ord(s[pos:pos + 1]) >> 4] | |
462 | if not l: # ascii |
|
462 | if not l: # ascii | |
463 | return s[pos] |
|
463 | return s[pos:pos + 1] | |
464 |
|
464 | |||
465 | c = s[pos:pos + l] |
|
465 | c = s[pos:pos + l] | |
466 | # validate with attempted decode |
|
466 | # validate with attempted decode |
General Comments 0
You need to be logged in to leave comments.
Login now