bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] Fwd: Bug#763820: gettext: msgunfmt aborts on incomplet


From: Daiki Ueno
Subject: Re: [bug-gettext] Fwd: Bug#763820: gettext: msgunfmt aborts on incomplete UTF-8 character
Date: Fri, 03 Oct 2014 17:18:46 +0900
User-agent: 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"
> Aborted
>
> 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[1], 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.)

Footnotes: 
[1]  https://en.wikipedia.org/wiki/Robustness_principle




reply via email to

[Prev in Thread] Current Thread [Next in Thread]