Re: Two questions
- From: Karl Eichwalder <ke gnu franken de>
- To: Carlos Perelló Marín <carlos gnome-db org>
- Cc: "R.I.P. Deaddog" <maddog linuxhall org>,Yukihiro Nakai <ynakai redhat com>, Wang Jian <lark linux net cn>,GNOME i18n list <gnome-i18n gnome org>
- Subject: Re: Two questions
- Date: Wed, 23 Jan 2002 06:14:08 +0100
Carlos Perelló Marín <carlos@gnome-db.org> writes:
To convert a .po file to UTF-8 use something like the following code
(tested with iso-8859-1 and EUC-KR); I guess you already wrote such a
script:
#!/bin/sh
# po2utf8.sh
po=$1
charset=$(sed -n -e '/^"Content/{s/.*=\(.*\)\\n"/\1/;p;q;}' "$po")
sed -e 's/^\("Content-Type:.*=\).*/\1UTF-8\\n"/' "$po" \
| iconv --from-code $charset --to-code=UTF-8
# po2utf8.sh ends here
Once gettext-0.11 is released, please use 'msgconv'.
> If you have a way to do it when you do the "make install" then it's
> perfect to me.
It must happen a little bit earlier; at .mo file creation time. In
po/Makefile.in.in look for the .po.gmo target and replace $(GMSGFMT)
basically with
po2utf8.sh $po | msgfmt -
You can quickly check the result running 'msgunfmt' on the .mo file.
--
ke@suse.de (work) / keichwa@gmx.net (home): |
http://www.suse.de/~ke/ | ,__o
Free Translation Project: | _-\_<,
http://www.iro.umontreal.ca/contrib/po/HTML/ | (*)/'(*)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]