Use correct char set for command-line scripts

Bug #558167 reported by trmac
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Mark Sapiro

Bug Description

The command-line scripts in mailman-2.1.5 share the i18n
framework with the rest of mailman, but unlike the rest
of mailman,
mailman is not in control of the characer set used; it
should always
use the character set specified by the LC_CTYPE locale
category.
Currently on a system using e.g. LANG=cs_CZ.UTF-8 the
Czech (cs) translation is selected, but the output uses the
character set of the translation (ISO 8859-2), not UTF-8.

The attached patch (roughly against 2.1.5) adds
Mailman.i18n.C_(),
which works like _(), except that the output is in the
LC_CTYPE-specified encoding, and modifies all command-line
utilities to use it.

Related branches

Revision history for this message
trmac (trmac) wrote :

The file mailman-2.1.5-LC_CTYPE.patch was added: Honor LC_CTYPE in command-line utilities

Revision history for this message
Yasuhito FUTATSUKI at POEM (futatuki) wrote :

This bug still annoys Japanese users using ja_JP.UTF-8 locale on their terminals, using euc-jp as list charset.
Fortunately, patch attached to comment #1 has been maintained on rpm sources for fedora/RHEL
with additional patches, so I'm try to review them and working on a branch to follow latest 2.1 branch,
lp:mailman/2.1-commandline-locale (merged these patches, fix for potfile making, but not tested yet).

Revision history for this message
Yasuhito FUTATSUKI at POEM (futatuki) wrote :

I have tested for each commands under bin, with -h option on both of ja_JP.UTF-8 and ja_JP.eucJP terminal
environment by using LC_CTYPE and LC_MESSAGES environment variables. It works fine.

Some commands still outputs untranslated messages, bin/b4b5-archfix and bin/transcheck for example,
but It is because those messages are not wrapped in _() or C_().

I'll send merge request.

Mark Sapiro (msapiro)
Changed in mailman:
assignee: nobody → Mark Sapiro (msapiro)
importance: Undecided → Medium
milestone: none → 2.1.21
status: New → Fix Committed
Mark Sapiro (msapiro)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.