Opened 10 years ago

Closed 10 years ago

#9018 closed defect (Fixed)

MythWeather locale issue with

Reported by: rune.evjen@… Owned by: beirdo
Priority: minor Milestone: 0.24
Component: Plugin - MythWeather Version: Master Head
Severity: medium Keywords: mythweather locale yr
Cc: Ticket locked: no


When using the Norwegian weather data provider, there seems to be some UTF-8/ISO-8859-1 encoding problems for Norwegian æøå letters.

A 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 2010.

But in mythweather and when running the 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

If I convert the output from from ISO-8859-1 to UTF-8 using iconv -f ISO-8859-1 -t UTF-8 <yrnoxml-output> the norwegian letters are displayed fine. output when I run from a terminal is attached to this ticket.

My user locale is set to:

rune@server:~$ locale

mythfrontend --version

Please attach all output as a file in bug reports.
MythTV Version   : 26520
MythTV Branch    : trunk
Network Protocol : 63
Library API      : 0.23.20100917-1
QT Version       : 4.6.2
Options compiled in:
 linux debug using_alsa using_jack using_oss using_pulse using_pulseoutput using_backend using_bindings_perl using_bindings_python using_dvb using_firewire using_frontend using_hdhomerun using_hdpvr using_iptv using_ivtv using_joystick_menu using_lirc using_mheg using_opengl_video using_opengl_vsync using_qtdbus using_qtwebkit using_v4l using_x11 using_xrandr using_xv using_xvmc using_xvmc_vld using_xvmcw using_bindings_perl using_bindings_python using_mythtranscode using_opengl using_vdpau using_ffmpeg_threads using_live using_mheg

Attachments (1)

yrnoxml-output (1.3 KB) - added by anonymous 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by anonymous

Attachment: yrnoxml-output added

comment:1 Changed 10 years ago by beirdo

Status: newaccepted

comment:2 Changed 10 years ago by beirdo

Milestone: unknown0.24

comment:3 Changed 10 years ago by beirdo

Resolution: Fixed
Status: acceptedclosed

(In [26740]) Properly support UTF-8 in strings internally in the weather scraper scripts. UTF-8 and perl can be quite a chore at times. This has been tested with the use of LC_ALL=no_NB.utf8 as in the bug report.

Fixes #9018.

Note: See TracTickets for help on using tickets.