Package: python3-polib
Version: 1.0.2-1
Severity: minor

polib cannot parse .po files that contain (correctly encoded) U+0085 (NEXT LINE) characters. Apparently it's because polib considers them as line separators. This is unlike gettext, which (as far as I can tell) splits lines only on ASCII CR and ASCII LF.


$ msgfmt -c x85.po && echo okay
okay

$ python3 -c 'import polib; polib.pofile("x85.po")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/polib.py", line 108, in pofile
    return _pofile_or_mofile(pofile, 'pofile', **kwargs)
  File "/usr/lib/python3/dist-packages/polib.py", line 74, in _pofile_or_mofile
    instance = parser.parse()
  File "/usr/lib/python3/dist-packages/polib.py", line 1290, in parse
    (self.instance.fpath, i))
IOError: Syntax error in po file x85.po (line 16)


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.5-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python3-polib depends on:
ii  python3  3.2.3-6

--
Jakub Wilk

Attachment: x85.po.gz
Description: Binary data

Reply via email to