[PATCH] Set character set for libc.pot (preparing for 2.16 update for translation team).

Carlos O'Donell carlos_odonell@mentor.com
Wed Jun 13 20:54:00 GMT 2012


Team,

In preparing for the 2.16 release I need to regenerate the libc.pot file.

The first bug I'd like to tackle is that we don't set the character set 
for the pot file. This results in a warning:

~~~
po/libc.pot.new: warning: Charset "CHARSET" is not a portable encoding name.
                          Message conversion to user's charset might not work.
~~~

We can either set it in the po/header.pot file or in the Makefile.

I would prefer to set it in the Makefile so we don't loose the setting
if we regenerate the header from scratch.

Is UTF-8 the correct value here?

It's probably overkill, but that's fine.

Comments?

2012-06-13  Carlos O'Donell  <carlos_odonell@mentor.com>

	* po/Makefile (libc.pot): Set charset to UTF-8.

diff --git a/po/Makefile b/po/Makefile
index 4ca0d1c..3e3f909 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -56,6 +56,7 @@ libc.pot: header.pot libc.pot.files
        set `date -R`; disp="$$6"; \
        sed -e 's/VERSION/$(version)/' \
            -e "s/DATE/`date +'%Y-%m-%d %H:%M'$$disp`/" \
+           -e "s/CHARSET/UTF-8/" \
            $< > $@.new
        egrep -v '\.ksh$$' $(word 2,$^) > $(objdir)/tmp-libc.pot-files
        cd ..; $(XGETTEXT) --keyword=_ --keyword=N_ \
---

Cheers,
Carlos.
-- 
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell@mentor.com
carlos@codesourcery.com
+1 (613) 963 1026



More information about the Libc-alpha mailing list