##// END OF EJS Templates
encoding: ensure getutf8char always returns a bytestr, never an int
Augie Fackler -
r34197:112f118e default
parent child Browse files
Show More
@@ -458,9 +458,9 b' def getutf8char(s, pos):'
458 458 '''
459 459
460 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 462 if not l: # ascii
463 return s[pos]
463 return s[pos:pos + 1]
464 464
465 465 c = s[pos:pos + l]
466 466 # validate with attempted decode
General Comments 0
You need to be logged in to leave comments. Login now