GNOME Bugzilla – Bug 99005
UTF-8 trouble
Last modified: 2009-08-15 18:40:50 UTC
Gnumeric has started including UTF-8 strings in the source using C-level escapes. (See bug 85718.) This causes xgettext to complain. intltool needs to somehow shut up this warning. The idea thing would be for intltool to know that we're dealing with UTF-8 and pass some flag (which does not yet exist, mind you) to xgettext to make it happy. Alternatively, intltool could filter out the warning from xgettext. To the extent that this is a xgettext problem, please pass it down the food chain.
I think we should just filter it out for now. If you could send me a small patch, that would be perfect. If not, I will look at it when I hav e time.
Filtering out is not trivial since, I imagine, that the error message is likely to be translated.
Morten, do you mind filing a bug at gettext?
I did a month ago, but I have heard nothing -- not a single "0" or "1" from them.
This seems to have been fixed in later gettext versions: http://lists.gnome.org/archives/gnome-i18n/2003-May/msg00139.html Quote: "xgettext now supports msgid strings in other encodings than ASCII. xgettext has a new option --from-code that specifies the encoding of the source files. The resulting POT files are UTF-8 encoded." Would this mean that intltool needs to have a dependency on newer gettexts? Btw, I don't see how just filtering out as mentioned in the beginning of this report would solve the problem.
Confirming that adding "--from-code=UTF-8" to the xgettext line fixes things in gettext 1.12.1. I suggest that intltools immediate starts using this option when available, but without an explicit dependency yet. Upping priority -- this has got to be a Gnome-wide problem that now even has a solution.
Carlos has a patch posted on gnome-i18n that mostly addressed this problem, which tries to autodetect file encoding. I've enhanced a bit so that one can manually override the choice. To try the patch, add "[encoding:UTF-8]" as the first line in POTFILES.in (mlview is a good choice for testing), and run patched intltool-update with "-p" option. changelog is not in the patch yet.
Created attachment 18451 [details] [review] aforementionted patch that includes Carlos' patch
missed one point. This patch needs gettext >= 0.12.
Next status pages update will have this patch applied.
*** Bug 117958 has been marked as a duplicate of this bug. ***
This bug is fixed with latest intltool. Now gnumeric need intltool >= 0.27 and has a requirement. ALL strings that should be translated, should be using UTF-8 (or ASCII) NOTE: We are working now with SUN people to fix this issue also with their gettext implementation. But I think that they will use GNU xgettext because it's the easiest solution, so I'm going to close this bug.