[rrd-users] rrdtool::graph and German weekday names

Heinrich Schnorrenberg heinrich.schnorrenberg at t-online.de
Thu Nov 2 23:38:45 CET 2017


Hi Jochen


I just checked it on my raspi . here it works.  the script is :
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++

 #!/usr/bin/perl -w
#
use warnings;
use POSIX qw(locale_h);
use locale;
use POSIX qw(strftime);


#
for (1..7) {
   $wochentag[$_] = strftime("%a", 0, 0, 0, $_, 3, 96);
   printf "$wochentag[$_]\n";
}

> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
the output is:

pi at raspberrypi:~/public_html/cgi-bin $ perl loc.pl
Mo
Di
Mi
Do
Fr
Sa
So

hope that helps

regards Heinrich



> On 2. Nov 2017, at 11:02, Joachim Hartmann <joachim.hartmann at gmx-topmail.de> wrote:
> 
> Hi Tobi,
> Am 01.11.2017 um 20:19 schrieb Tobias Oetiker:
>> Hi Joachim,
>> Tobias Oetiker
> 
>> I would suggest to use
>> use POSIXqw(locale_h);
>> use locale;
>> setlocale(LC_CTYPE,"de_DE.UTF-8");
>> INSIDE the script
>> More details on this to be found here https://perldoc.perl.org/perllocale.html
>> Cheers
>> Tobi
> 
> the proposed solution shows no change. I then looked at the recommended web page and ran the following script on the command line:
> 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> #!/usr/bin/perl
> use POSIX qw(strftime);
> 
> for (1..7) {
>    $wochentag[$_] = strftime("%a", 0, 0, 0, $_, 3, 96);
>    printf "$wochentag[$_]\n";
> }
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> Here is the result:
> 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> #~#. /test_locale. pl
> Mo
> Di
> Wed
> Thu
> Fr
> Sa
> So
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 
> I think now rather that the solution can be found in rrdtool (1.6.0).
> -- 
> Cheers
> Jochen
> 
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20171102/f079f807/attachment.html>


More information about the rrd-users mailing list