Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#2574 closed defect (invalid)

UTF8 displaying issues

Reported by: aliz@… Owned by: xris
Priority: minor Milestone: unknown
Component: mythweb Version: 0.20
Severity: medium Keywords:
Cc: Ticket locked: no


I'm not sure this is how it's supposed to work and my system is set up wrong but here it is:

Mythconverg.program is populated with utf8 encoded data by mythfilldatabase, but when viewing the listings in mythweb, and the data comes from sql (includes/programs.php line 368) the swedish characters (åäö) is displayed wrong. When it comes from the mythbackend they are displayed correctly. A workaround would be to use utf8_decode when setting the various $this-> variables when using data directly from the database.

To add further, when using power searches to find a recoring I must use "where title like 'V%nner' to be able to select programs with swedish characters in the title. But I suspect that this is the intention and that my system isn't very UTF8 capable.

Change History (5)

comment:1 Changed 14 years ago by josesuarez1983

Component: mythwebmythtv
Owner: changed from xris to Isaac Richards

It happens the same to me. Most of the Spanish TV Stations' EPG (EIT) show up wrong characters, such as when there should be a ñ, á, é, í, ó, or ú (and their capitalized versions). I can write those characters both in KDE and in the system console, and the system is also capable of outputing such characters. BTW, this is the output of locale:

jose@amd64:~$ locale LANG=es_ES@euro LANGUAGE=es_ES:es:en_GB:en LC_CTYPE="es_ES@euro" LC_NUMERIC="es_ES@euro" LC_TIME="es_ES@euro" LC_COLLATE="es_ES@euro" LC_MONETARY="es_ES@euro" LC_MESSAGES="es_ES@euro" LC_PAPER="es_ES@euro" LC_NAME="es_ES@euro" LC_ADDRESS="es_ES@euro" LC_TELEPHONE="es_ES@euro" LC_MEASUREMENT="es_ES@euro" LC_IDENTIFICATION="es_ES@euro" LC_ALL=

If you need some more info, just tell me.

comment:2 Changed 14 years ago by josesuarez1983

This is an example taken from the database:

LOCK TABLES recordedprogram WRITE; /*!40000 ALTER TABLE recordedprogram DISABLE KEYS */; INSERT INTO recordedprogram VALUES (1301,'2006-11-03 18:00:00','2006-11-03 19:00:00','FLY BOX','Selecciðn de videos','Selecciðn de videos',,,0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,0,1,0,0),(1261,'2006-11-03 16:45:00','2006-11-03 17:15:00','Sports Night','Conoceremos entre bastidores cðmo funciona un programa de deportes por cable asÊ como las vidas personales y profesionales de ','Natalie y Jeremy discuten por ir a un club. Dan pasarÃâ  la noche fuera y un sustituto no puede hacer su trabajo por culpa de su novia.',,,0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,0,1,0,0),(1261,'2006-11-03 17:15:00','2006-11-03 18:05:00','Doc','El apuesto doctor Clint Cassidy, mÃËdico de una zona rural, se traslada por amor desde una pequeÊa localidad del estado de Mont','Está Nancy preparada para continuar con su vida? Tippy Williams le intentará organizar una cita con un joven abogado pero Nancy se sentirá más cerca de Clint, mientras éste continúa su relación con la doctora Weston.',,,0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,0,1,0,0),(1381,'2006-11-03 16:55:00','2006-11-03 17:30:00','Jara Y Sedal','Programa que se ocupa de temas relacionadas con la pesca y la caza.',,'Leisure/Hobbies?','tvshow',0000,0,0,,1,0,0,0,0,0,,NULL,,,,,0,0,1,0,0),(1260,'2006-11-03 15:45:00','2006-11-03 17:30:00','Telecine de Aurum','La mejor selecciðn de thrillers del mercado de la televisiðn.','MAS ALLA DE LA PASION',,,0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,0,1,0,0),(1260,'2006-11-03 17:30:00','2006-11-03 18:00:00','La hora manga de Arait - Jester',,'Animaciðn Manga',,,0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,0,1,1,0),(1180,'2006-11-03 17:00:00','2006-11-03 17:45:00','YO SOY BEA',,,,,0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,1,1,1,1),(1140,'2006-11-03 17:00:00','2006-11-03 19:15:00','EN ANTENA','(TP) (ENTRETENIMIENTO MAGACN) magacÊn vespertino que tiene como ejes principales la actualidad y la crðnica social y que condu','.','Talk Show','tvshow',0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,0,1,1,1),(1261,'2006-10-06 18:10:00','2006-10-06 19:05:00','LAS NUEVAS AVENTURAS DE FLIPPER','Pandilla de surfistas','Flipper vuelve con nuevas aventuras que tendrÃâ n lugar en el Instituto Marino de Florida, donde se centran en estudiar el comportamiento de los delfines.',,,0000,0,0,,0,0,0,0,0,0,,NULL,,,,,0,0,1,1,0); /*!40000 ALTER TABLE recordedprogram ENABLE KEYS */; UNLOCK TABLES;

comment:3 Changed 14 years ago by stuartm

Component: mythtvmythweb
Owner: changed from Isaac Richards to xris

comment:4 Changed 14 years ago by xris

Resolution: invalid
Status: newclosed

You need to update your system locale to use UTF8, and make sure that mysql and php are both running in a UTF8 compatible mode (there are settings per-table in mysql).

comment:5 Changed 14 years ago by anonymous

Since only the title had the defective characters and not the subtitle or the description I checked the code again and saw that the only variable that was different to the other was the title variable.

in include/programs.php row ~388 I changed:

$this->title = $datatitle?; $this->title = utf8_decode($datatitle?);

And now all is well, atleast with swedish characters. I still don't know if this will brake anything, but I couldn't schedule shows with swedish characters in the title before this and now I can.

Note: See TracTickets for help on using tickets.