Bug#410057: cron should send email with UTF-8 charset as it's default in Etch

2007-02-07 Thread Teemu Likonen
Package: cron
Version: 3.0pl1-100
Severity: important

UTF-8 charset is default in Etch and hence I think cron should send
email messages with this charset. I tried to source and export my
system's locale variables (LANG and LC_*) in /etc/init.d/cron but it did
not effect to emails sent by the cron. But adding

CONTENT_TYPE=text/plain; charset=utf-8

to every crontab file works. It would be nicer to use system's locale
variables, though. More information is in the crontab(5) manual.

Even if system administrator chooses to use non-UTF-8 locale, it doesn't
necessarily hurt to send messages with UTF-8 charset since mail user
agents handle the conversion. It only hurts when administrator creates
non-UTF-8 encoded scritps which write something to stdout in a cron job.


-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.18-3-k7
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)

Versions of packages cron depends on:
ii  adduser 3.102Add and remove users and groups
ii  debianutils 2.17 Miscellaneous utilities specific t
ii  libc6   2.3.6.ds1-10 GNU C Library: Shared libraries
ii  libpam0g0.79-4   Pluggable Authentication Modules l
ii  libselinux1 1.32-3   SELinux shared libraries
ii  lsb-base3.1-22   Linux Standard Base 3.1 init scrip

Versions of packages cron recommends:
ii  exim4 4.63-17metapackage to ease exim MTA (v4) 
ii  exim4-daemon-light [mail-tran 4.63-17lightweight exim MTA (v4) daemon

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#410057: cron should send email with UTF-8 charset as it's default in Etch

2007-02-07 Thread Teemu Likonen
tags 410057 + patch
thanks

 I tried to source and export my
 system's locale variables (LANG and LC_*) in /etc/init.d/cron but it
 did not effect to emails sent by the cron.

I was wrong. This works just fine; I don't know what I did wrong first. 

Anyway, I suggest to add something like the following lines


environment=/etc/environment
default_locale=/etc/default/locale
[ -e $environment ]  . $environment
[ -e $default_locale ]  . $default_locale
export LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE \
LC_MEASUREMENT LC_IDENTIFICATION LC_ALL


to the /etc/init.d/cron file. After that cron respects system's locales 
and sends emails encoded accordingly.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]