##// END OF EJS Templates
templatefilters: use encoding.unifromlocal/unitolocal() for py3 compatibility
Yuya Nishihara -
r36515:b2e54b25 default
parent child Browse files
Show More
@@ -152,12 +152,12 b" def fill(text, width, initindent='', han"
152 152 while True:
153 153 m = para_re.search(text, start)
154 154 if not m:
155 uctext = unicode(text[start:], encoding.encoding)
155 uctext = encoding.unifromlocal(text[start:])
156 156 w = len(uctext)
157 157 while 0 < w and uctext[w - 1].isspace():
158 158 w -= 1
159 yield (uctext[:w].encode(encoding.encoding),
160 uctext[w:].encode(encoding.encoding))
159 yield (encoding.unitolocal(uctext[:w]),
160 encoding.unitolocal(uctext[w:]))
161 161 break
162 162 yield text[start:m.start(0)], m.group(1)
163 163 start = m.end(1)
General Comments 0
You need to be logged in to leave comments. Login now