Show More
@@ -152,12 +152,12 b" def fill(text, width, initindent='', han" | |||||
152 | while True: |
|
152 | while True: | |
153 | m = para_re.search(text, start) |
|
153 | m = para_re.search(text, start) | |
154 | if not m: |
|
154 | if not m: | |
155 |
uctext = |
|
155 | uctext = encoding.unifromlocal(text[start:]) | |
156 | w = len(uctext) |
|
156 | w = len(uctext) | |
157 | while 0 < w and uctext[w - 1].isspace(): |
|
157 | while 0 < w and uctext[w - 1].isspace(): | |
158 | w -= 1 |
|
158 | w -= 1 | |
159 |
yield (uctext[:w] |
|
159 | yield (encoding.unitolocal(uctext[:w]), | |
160 |
uctext[w:] |
|
160 | encoding.unitolocal(uctext[w:])) | |
161 | break |
|
161 | break | |
162 | yield text[start:m.start(0)], m.group(1) |
|
162 | yield text[start:m.start(0)], m.group(1) | |
163 | start = m.end(1) |
|
163 | start = m.end(1) |
General Comments 0
You need to be logged in to leave comments.
Login now