[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: msgfmt -cv aborts with no message at all
From: |
Bruno Haible |
Subject: |
Re: msgfmt -cv aborts with no message at all |
Date: |
Thu, 11 Sep 2003 19:08:01 +0200 |
User-agent: |
KMail/1.5 |
PS: A better fix is this one. It leads to:
$ msgfmt minicom-2.1.pot
minicom-2.1.pot:971:68: ungültige Multibyte-Sequenz
msgfmt: es ist 1 fataler Fehler aufgetreten
diff -c -3 -r1.7 -r1.9
*** gettext-tools/src/po-lex.c 9 Sep 2003 13:40:36 -0000 1.7
--- gettext-tools/src/po-lex.c 11 Sep 2003 17:07:33 -0000 1.9
***************
*** 510,518 ****
if (outbytes == 0)
abort ();
/* Convert it from UTF-8 to UCS-4. */
mbc->uc_valid = true;
- if (u8_mbtouc (&mbc->uc, scratchbuf, outbytes) != outbytes)
- abort ();
break;
}
}
--- 510,525 ----
if (outbytes == 0)
abort ();
/* Convert it from UTF-8 to UCS-4. */
+ if (u8_mbtouc (&mbc->uc, scratchbuf, outbytes) < outbytes)
+ {
+ /* scratchbuf contains an out-of-range Unicode character
+ (> 0x10ffff). */
+ if (signal_eilseq)
+ po_gram_error (_("invalid multibyte sequence"));
+ mbc->uc_valid = false;
+ break;
+ }
mbc->uc_valid = true;
break;
}
}