encoding of bin/script output
Hello!
I've noticed that output of bin scripts depends on $LANG environment variable. I can switch languages of output by issue "export LANG=en_US (or ru_RU)".
But what I could not find is how to switch a charset of output.
I tried to issue "export LANG=ru_RU.UTF-8", "export LANG=ru_RU.koi8-r" but output remains the same.
For example, nano text editor reacts on commands listed above and become unreadable in any encoding other than "ru_RU.UTF-8".
Thanks, Danil
It seems I forgot to type my question: how could I force bin scripts to change encoding of their output?
Thanks.
2015-02-04 18:37 GMT+02:00 Danil Smirnov danil@smirnov.la:
Hello!
I've noticed that output of bin scripts depends on $LANG environment variable. I can switch languages of output by issue "export LANG=en_US (or ru_RU)".
But what I could not find is how to switch a charset of output.
I tried to issue "export LANG=ru_RU.UTF-8", "export LANG=ru_RU.koi8-r" but output remains the same.
For example, nano text editor reacts on commands listed above and become unreadable in any encoding other than "ru_RU.UTF-8".
Thanks, Danil
On 02/04/2015 12:18 PM, Danil Smirnov wrote:
It seems I forgot to type my question: how could I force bin scripts to change encoding of their output?
You can't. You say "output of bin scripts depends on $LANG environment variable". I don't think that's correct. I think it depends, in those cases where it isn't English only, on Mailman's setting for DEFAULT_SERVER_LANGUAGE.
In any case Mailman has a character encoding for each language it knows and it always uses that encoding. For Russian, this encoding is koi8-r because that is the encoding that was used when the Russian translation was first developed.
If you think the encoding should be utf-8, you can change it for your own site by putting
add_language('ru', 'Russian', 'utf-8', 'ltr')
in mm_cfg.py and recoding all of templates/ru/* and the messages/ru/LC_MESSAGES/mailman.po file to utf-8 and regenerating the messages/ru/LC_MESSAGES/mailman.mo file.
If you want us to change it for a future release, file a bug at https://bugs.launchpad.net/mailman/+filebug and try to make a good argument for it.
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Danil Smirnov
-
Mark Sapiro