Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83800a6 commit 9600f93Copy full SHA for 9600f93
1 file changed
Lib/gettext.py
@@ -292,7 +292,7 @@ def _parse(self, fp):
292
if mlen == 0:
293
# Catalog description
294
lastk = k = None
295
- for b_item in tmsg.split(os.linesep):
+ for b_item in tmsg.split(os.linesep.encode("ascii")):
296
item = str(b_item).strip()
297
if not item:
298
continue
@@ -321,8 +321,8 @@ def _parse(self, fp):
321
# if the Unicode conversion fails.
322
if b'\x00' in msg:
323
# Plural forms
324
- msgid1, msgid2 = msg.split('\x00')
325
- tmsg = tmsg.split('\x00')
+ msgid1, msgid2 = msg.split(b'\x00')
+ tmsg = tmsg.split(b'\x00')
326
if self._charset:
327
msgid1 = str(msgid1, self._charset)
328
tmsg = [str(x, self._charset) for x in tmsg]
0 commit comments