##// END OF EJS Templates
py3: wrap bytes in encoding.from/toutf8b() with bytestr
Yuya Nishihara -
r34213:1c601df9 default
parent child Browse files
Show More
@@ -508,6 +508,7 b' def toutf8b(s):'
508 except UnicodeDecodeError:
508 except UnicodeDecodeError:
509 pass
509 pass
510
510
511 s = pycompat.bytestr(s)
511 r = ""
512 r = ""
512 pos = 0
513 pos = 0
513 l = len(s)
514 l = len(s)
@@ -560,6 +561,7 b' def fromutf8b(s):'
560 # points to be escaped. Instead, we use our handy getutf8char
561 # points to be escaped. Instead, we use our handy getutf8char
561 # helper again to walk the string without "decoding" it.
562 # helper again to walk the string without "decoding" it.
562
563
564 s = pycompat.bytestr(s)
563 r = ""
565 r = ""
564 pos = 0
566 pos = 0
565 l = len(s)
567 l = len(s)
General Comments 0
You need to be logged in to leave comments. Login now