On Fri, 26 Feb 2010, Roger Leigh wrote:
[...] the localised messages are not being recoded from UTF-8 to the
locale charmap at runtime, and this is the cause of the corrupted
output. This is a bug. Localisation systems such as gettext (what
pretty much everything uses) will automatically recode from the .po/.mo
translation encoding to the locale encoding ('locale -k charmap'). If
this isn't happening, rkhunter's localisation is broken.
Looking at rkhunter_1.3.6.orig.tar.gz / rkhunter-1.3.6/files/rkhunter, the
problem might be in the display() user-defined shell function. The UTF-8
encoded message could be recoded to the user's charmap by iconv, for
example.
The localisation machinery should however contain some fallbacks
(transliterations) for non-represented characters which are a best
effort, albeit lossy, conversion.
Fortunately, iconv seems to support this.
$ locale -k charmap
charmap="ISO-8859-2"
$ iconv -f UTF-8 -t ISO-8859-2//TRANSLIT
...
(See the iconv manual page for more on //TRANSLIT.)
-o-
(As a bit less constructive suggestion: why not drop localized messages
completely? Maintaining translations must surely be a pain in the ass,
probably requiring multiple contributors to sync their efforts. I (almost)
never see an application correctly and understandably translated into
Hungarian, for example -- I just don't believe in localized messages
anymore. Halfway translates messages give the application a very
unhygienic appearance. Desktop applications probably can't afford to omit
localized messages, but I'd guess the target audience of RootKit Hunter (=
sysadmins, I suppose) must have a working knowledge of English anyway. Not
to mention users asking for help and seeing / pasting localized program
messages -- being scattered across several natural languages greatly
reduces the googleability of those messages.)
Cheers,
lacos
--
To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive:
http://lists.debian.org/pine.lnx.4.64.1002261820480.27...@login01.caesar.elte.hu