[mythtv-users] MythWeather/Perl locale UTF-8/ISO-8859-1 problems ?
rune.evjen at gmail.com
Sun Sep 26 21:12:38 UTC 2010
2010/9/26 Gavin Hurlbut <gjhurlbu at gmail.com>:
> On Sun, Sep 26, 2010 at 1:03 PM, Rune Evjen <rune.evjen at gmail.com> wrote:
>> When using the Norwegian yr.no weather data provider in current trunk,
>> I get what seems to be some UTF-8/ISO-8859-1 encoding problems for
>> Norwegian æøå letters.
>> It seems that the function 'format_date' in
>> '/usr/share/mythtv/mythweather/scripts/no_yrno/yrnoxml.pl' returns
>> no-UTF8 character, even if the locale is/should be correctly set.
>> The small perl test:
>> use POSIX qw(strftime);
>> print strftime "%a %b %e %H:%M:%S %Y", localtime;
>> works fine, and gives a UTF-8 display of the date: sø. sep. 26 21:53:30
>> But in mythtv and when running the yrnoxml.pl script the date is shown
>> like this:
>> date-0::ma. sep. 27, 2010 12:00:00
>> date-1::ti. sep. 28, 2010 12:00:00
>> date-2::on. sep. 29, 2010 14:00:00
>> date-3::to. sep. 30, 2010 14:00:00
>> date-4::fr. okt. 1, 2010 14:00:00
>> date-5::lÃ¸. okt. 2, 2010 14:00:00
>> observation_time::sÃ¸. sep. 26, 2010 19:15:00
>> Based on my very limited perl understanding the above output is
>> created using the 'format_date' function, which uses strftime to
>> convert the raw data to the date format in the script output, in more
>> or less the same way as my test script which has a correct output.
>> If I convert the output from yrnoxml.pl from ISO-8859-1 to UTF-8 using
>> iconv -f ISO-8859-1 -t UTF-8 <yrnoxml-output> the norwegian letters
>> are displayed fine.
>> My user locale is set to:
>> rune at server:~$ locale
>> Has anyone seen this before ? Is this a locale configuration issue ?
> Pretty sure this is a script bug. Please put in a ticket and I'll look into
I have created ticket http://svn.mythtv.org/trac/ticket/9018 with the
More information about the mythtv-users