[Mailman-Developers] 'Charset "CHARSET"' warning when doing make catalogs

Simone Piunno pioppo at ferrara.linux.it
Sat Feb 15 14:09:55 EST 2003


On Fri, Feb 14, 2003 at 11:35:17PM +0100, Matthias Juchem wrote:

> msgfmt -o lt/LC_MESSAGES/mailman.mo lt/LC_MESSAGES/mailman.po
> Merging new template file with existing translations
> mv nl/LC_MESSAGES/mailman.po nl/LC_MESSAGES/mailman.po.old && msgmerge -o
>  nl/LC_MESSAGES/mailman.po nl/LC_MESSAGES/mailman.po.old mailman.pot
>  mailman.pot: warning: Charset "CHARSET" is not a portable encoding name.

> Can I safely ignore the warning?

in my experience yes, it works anyway, because mailman.pot is written
in plain ascii.  The original xgettext does the same but I think it 
should grow a command line option to declare the used charset (maybe
defaulting to ascii).

A possible patch:

--- bin/pygettext.py	2003-02-15 13:46:49.000000000 +0100
+++ bin/pygettext.py.new	2003-02-15 14:05:03.000000000 +0100
@@ -175,7 +175,7 @@
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\\n"
 "Language-Team: LANGUAGE <LL at li.org>\\n"
 "MIME-Version: 1.0\\n"
-"Content-Type: text/plain; charset=CHARSET\\n"
+"Content-Type: text/plain; charset=%(charset)s\\n"
 "Content-Transfer-Encoding: ENCODING\\n"
 "Generated-By: pygettext.py %(version)s\\n"
 
@@ -336,7 +336,11 @@
         timestamp = time.ctime(time.time())
         # The time stamp in the header doesn't have the same format as
         # that
         # generated by xgettext...
-        print >> fp, pot_header % {'time': timestamp, 'version': __version__}
+        print >> fp, pot_header % {
+            'time':    timestamp, 
+            'charset': options.charset,
+            'version': __version__
+        }
         # Sort the entries.  First sort each particular entry's keys,
         # then
         # sort all the entries by their first item.
         reverse = {}
@@ -423,6 +427,7 @@
         excludefilename = ''
         docstrings = 0
         nodocstrings = {}
+        charset = 'US-ASCII'
 
     options = Options()
     locations = {'gnu' : options.GNU,
@@ -435,6 +440,8 @@
             usage(0)
         elif opt in ('-a', '--extract-all'):
             options.extractall = 1
+        elif opt in ('--charset'):
+            options.charset = arg
         elif opt in ('-d', '--default-domain'):
             options.outfile = arg + '.pot'
         elif opt in ('-E', '--escape'):


-- 
 Simone Piunno -- http://members.ferrara.linux.it/pioppo 
.-------  Adde parvum parvo magnus acervus erit  -------.
 Ferrara Linux Users Group - http://www.ferrara.linux.it 
 Deep Space 6, IPv6 on Linux - http://www.deepspace6.net 
 GNU Mailman, Mailing List Manager - http://www.list.org 
`-------------------------------------------------------'



More information about the Mailman-Developers mailing list