<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Joachim,<br><br><div id="AppleMailSignature">Tobias Oetiker</div><div><br>On 1 Nov 2017, at 19:17, Joachim Hartmann <<a href="mailto:joachim.hartmann@gmx-topmail.de">joachim.hartmann@gmx-topmail.de</a>> wrote:<br><br></div><blockquote type="cite"><div><span>Hello perl experts,</span><br><span>I run Munin on a Debian server. In the graphs the days of the week are</span><br><span>displayed in German. Now I monitor the weather data on a raspberry,</span><br><span>which basically works, but the days of the week are displayed in</span><br><span>English. How do I get this Perl script to display the weekdays in</span><br><span>English?</span><br></div></blockquote><div><br></div><div>Chances are that the locale when running as a cgi is different than the locale you got when logging into the server interactively.</div><div><br></div><div>I would suggest to use</div><div><br></div><div><a class="l_k" href="https://perldoc.perl.org/functions/use.html" style="background-color: rgba(255, 255, 255, 0); font-weight: bold;">use</a><span style="background-color: rgba(255, 255, 255, 0);"> </span><span class="w" style="background-color: rgba(255, 255, 255, 0);">POSIX</span><span style="background-color: rgba(255, 255, 255, 0);"> </span><span class="q" style="background-color: rgba(255, 255, 255, 0);">qw(locale_h)</span><span class="sc" style="background-color: rgba(255, 255, 255, 0);">;</span></div><div><a class="l_k" href="https://perldoc.perl.org/functions/use.html" style="background-color: rgba(255, 255, 255, 0); font-weight: bold;">use</a><span style="background-color: rgba(255, 255, 255, 0);"> </span><span class="w" style="background-color: rgba(255, 255, 255, 0);">locale</span><span class="sc" style="background-color: rgba(255, 255, 255, 0);">;</span></div><div><span class="i" style="background-color: rgba(255, 255, 255, 0);">setlocale</span><span class="s" style="background-color: rgba(255, 255, 255, 0);">(</span><span class="w" style="background-color: rgba(255, 255, 255, 0);">LC_CTYPE</span><span class="cm" style="background-color: rgba(255, 255, 255, 0);">,</span><span style="background-color: rgba(255, 255, 255, 0);"> </span><span class="q" style="background-color: rgba(255, 255, 255, 0);">"de_DE.UTF-8"</span><span class="s" style="background-color: rgba(255, 255, 255, 0);">)</span><span class="sc" style="background-color: rgba(255, 255, 255, 0);">;</span></div><div><span class="sc" style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span class="sc" style="background-color: rgba(255, 255, 255, 0);">INSIDE the script</span></div><div><span class="sc" style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span class="sc" style="background-color: rgba(255, 255, 255, 0);">More details on this to be found here </span><a href="https://perldoc.perl.org/perllocale.html">https://perldoc.perl.org/perllocale.html</a></div><div><span style="background-color: rgba(255, 255, 255, 0);"><br></span></div><div><span style="background-color: rgba(255, 255, 255, 0);">Cheers</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">Tobi</span></div><div><span style="background-color: rgba(255, 255, 255, 0);">;</span></div><blockquote type="cite"><div><span>+++++++++++++++++++++++++++++++++++++++</span><br><span></span><br><span>The output of locale is the same for both computers:</span><br><span></span><br><span>+++++++++++++++++++++++++++++++++++++++</span><br><span># locale</span><br><span>LANG=de_DE.UTF-8</span><br><span>LANGUAGE=</span><br><span>LC_CTYPE="de_DE.UTF-8"</span><br><span>LC_NUMERIC="de_DE.UTF-8"</span><br><span>LC_TIME="de_DE.UTF-8"</span><br><span>LC_COLLATE="de_DE.UTF-8"</span><br><span>LC_MONETARY="de_DE.UTF-8"</span><br><span>LC_MESSAGES="de_DE.UTF-8"</span><br><span>LC_PAPER="de_DE.UTF-8"</span><br><span>LC_NAME="de_DE.UTF-8"</span><br><span>LC_ADDRESS="de_DE.UTF-8"</span><br><span>LC_TELEPHONE="de_DE.UTF-8"</span><br><span>LC_MEASUREMENT="de_DE.UTF-8"</span><br><span>LC_IDENTIFICATION="de_DE.UTF-8"</span><br><span>LC_ALL=</span><br><span>++++++++++++++++++++++++++++++++++++++</span><br><span>-- </span><br><span>Greetings from the home of CeBIT</span><br><span>Gruß aus der Stadt der CeBIT</span><br><span>Jochen</span><br><span></span><br><span>_______________________________________________</span><br><span>rrd-users mailing list</span><br><span><a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a></span><br><span><a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a></span><br></div></blockquote></body></html>