[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] Fwd: Bug#763820: gettext: msgunfmt aborts on incomplet
Re: [bug-gettext] Fwd: Bug#763820: gettext: msgunfmt aborts on incomplete UTF-8 character
Fri, 03 Oct 2014 17:18:46 +0900
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)
Santiago Vila <address@hidden> writes:
> I received this from the Debian bug system:
Thanks for forwarding.
> msgunfmt aborts when trying to print some strings containing incomplete
> UTF-8 characters:
> $ msgfmt invalid-utf8.po -o invalid-utf8.mo
> $ msgunfmt invalid-utf8.mo
> msgid ""
> msgstr "Content-Type: text/plain; charset=UTF-8\n"
> msgid "x"
> I would expect that the incomplete character is ignored (with the usual
> "invalid multibyte sequence" warning); or at least that a reason for
> aborting is given.
I'm leaning to displaying some message before aborting, following the
robustness principle, where msgfmt should accept incomplete multibyte
sequence, while msgunfmt shouldn't output it in a UTF-8 PO file. (Note
that MO file is a binary format and does not carry encoding information.)