Re: Report mail has wrong time encoding

Jean-Louis Martineau <[email protected]> Fri, 4 Aug 2017 10:11:31 -0400
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <[email protected]>
I think a better solution is to add a header to tell the email is in UTF-8

Jean-Louis

On 04/08/17 04:49 AM, Josef Ridky wrote:
> Hi, I would like to remind you this issue.
> It has been reported almost year ago, but nothing seems to happen with it.
>
> Do you think this could be part of next release?
>
> Regards
>
> Josef Ridky
> Associate Software Engineer
> Core Services Team
> Red Hat Czech, s.r.o.
>
> ----- Original Message -----
> | From: "Josef Ridky" <[email protected]>
> | To: [email protected]
> | Sent: Friday, August 5, 2016 1:24:26 PM
> | Subject: Report mail has wrong time encoding
> |
> | Hi,
> |
> | I have a question. In amanda could be problem with encoding time in 
> report
> | mail header.
> |
> | Hostname: amandahost
> | Org : backuphost
> | Config : backuphost
> | Date : M�rz 21, 2016 <-!!!
> |
> | At [1] I found easy solution (just change LOCAL variable to 
> en_US.UTF-8), but
> | what if this is not suitable for user (he need different LOCAL 
> setting for
> | his system e.g. de_DE.UTF-8).
> |
> | What do you think about implementing of this patch, that should solve
> | described problem which is actual even for amanda-3.3.9 (source [2]):
> |
> | --- perl/Amanda/Report/human.pm.orig 2016-02-09 10:44:43.000000000 +0100
> | +++ perl/Amanda/Report/human.pm 2016-03-24 22:01:08.671869798 +0100
> | @@ -24,7 +24,7 @@
> | use warnings;
> | use Carp;
> |
> | -use POSIX;
> | +use POSIX qw(locale_h strftime);
> | use Data::Dumper;
> |
> | use Amanda::Config qw(:getconf config_dir_relative);
> | @@ -377,6 +377,7 @@
> | # TODO: this should be a shared method somewhere
> | my $timestamp = $report->get_timestamp();
> | my ($year, $month, $day) = ($timestamp =~ m/^(\d\d\d\d)(\d\d)(\d\d)/);
> | + setlocale(LC_TIME, "C");
> | my $date = POSIX::strftime('%B %e, %Y', 0, 0, 0, $day, $month - 1,
> | $year - 1900);
> | $date =~ s/ / /g; # get rid of intervening space
> |
> |
> |
> | [1] https://forums.zmanda.com/showthread.php?6134-Character-Encoding 
> <https://forums.zmanda.com/showthread.php?6134-Character-Encoding>
> | [2] https://bugzilla.redhat.com/show_bug.cgi?id=1317122 
> <https://bugzilla.redhat.com/show_bug.cgi?id=1317122>
> |
> | Regards
> |
> | Josef Ridky
> | Associate Software Engineer
> | Core Services Team
> | Red Hat Czech, s.r.o.
> |
> |
This message is the property of CARBONITE, INC. and may contain confidential or privileged information.
If this message has been delivered to you by mistake, then do not copy or deliver this message to anyone.  Instead, destroy it and notify me by reply e-mail