Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 331167 - sys-apps/logwatch should send mail in system locale(for example in UTF-8), but not in C
Summary: sys-apps/logwatch should send mail in system locale(for example in UTF-8), bu...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Benedikt Böhm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-04 07:28 UTC by Sergey Popov
Modified: 2010-09-19 09:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for logwatch to send reports in UTF-8 (logwatch-utf8.patch,1.44 KB, patch)
2010-08-04 07:30 UTC, Sergey Popov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Popov gentoo-dev 2010-08-04 07:28:44 UTC
logwatch always send mail reports in locale C and (as supposed by author of logwatch) only those scripts who support reports in other locales use real system locale.

Reproducible: Always

Steps to Reproduce:
1. install sys-apps/logwatch and configure sendmail/ssmtp/whatever to send mails
2. send report

Actual Results:  
e-mail is sent in default C locale(not in ru_RU.UTF-8 in my case)

Expected Results:  
e-mail should be sent in system locale(in my case - ru_RU.UTF-8)

This is not critical bug, BUT there some scripts(filesystem usage) that do not use $REAL_LANG variable, but can works well with system locale. Though i think that there must be a kind of patch for that situation. I upload my patch to logwatch.pl, it is works for me well, but it is locale-specific(ru_RU.UTF-8) and should be updated to be more general.
Comment 1 Sergey Popov gentoo-dev 2010-08-04 07:30:27 UTC
Created attachment 241377 [details, diff]
patch for logwatch to send reports in UTF-8

As i said early this patch works for me well, but it should be updated. Also to make this patch work you must set variable "Print = No" in logwatch.conf
Comment 2 Michael Weber (RETIRED) gentoo-dev 2010-08-06 09:01:51 UTC
Does upstream know about this?
Comment 3 Sergey Popov gentoo-dev 2010-08-06 09:04:48 UTC
Yes they know about this problem, but upstream policy is "if script does not support $REAL_LANG variable, then it must send data only in C locale". But how can such support be in simple 'df -hs'? I think that this is weird...
Comment 4 SpanKY gentoo-dev 2010-08-07 21:51:32 UTC
sounds like a debate to be had with the logwatch guys
Comment 5 Benedikt Böhm (RETIRED) gentoo-dev 2010-09-19 09:21:01 UTC
(In reply to comment #4)
> sounds like a debate to be had with the logwatch guys

agreed