[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xgettext complains about UTF conformance of strings not marked for t
From: |
Bruno Haible |
Subject: |
Re: xgettext complains about UTF conformance of strings not marked for translation |
Date: |
Sun, 18 Jun 2023 01:37:05 +0200 |
On 2020-12-27 I wrote:
> > Here is a minimal test case provided by Samuel:
> >
> > ----- Begin forwarded message -----
> >
> > € cat test.c
> >
> > #include <wchar.h>
> >
> > void f(const wchar_t *str) { }
> >
> > void g(void) {
> > f(L"\xABCDFF");
> > }
> >
> >
> > € xgettext test.c
> > xgettext: x-c.c:1666: phase5_get: Assertion `UNICODE_VALUE (c) >= 0 &&
> > UNICODE_VALUE (c) < 0x110000' failed.
> >
> > Samuel
> >
> > ----- End forwarded message -----
> ...
> The assertion could be converted to a reasonable error message, sure.
This is now done in gettext 0.22.
With gettext 0.20 and 0.21 we have this:
$ xgettext test.c
xgettext: x-c.c:1667: phase5_get: Assertion `UNICODE_VALUE (c) >= 0 &&
UNICODE_VALUE (c) < 0x110000' failed.
Aborted (core dumped)
Whereas with gettext 0.22 we have this:
$ xgettext test.c
test.c:6: warning: hexadecimal escape sequence out of range
> Since Samuel says:
>
> ... the file that poses problem is Testing/gtest/test/gtest_unittest.cc
> This is not something that contains anything to be translated, we'd need
> some option to just ignore Testing/ entirely.
>
> this looks like the better option.
This suggestion is no longer needed, now that xgettext no longer aborts.
Bruno
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: xgettext complains about UTF conformance of strings not marked for translation,
Bruno Haible <=