[mythtv-users] UTF-8 display problem in program guide with 0.21.0+fixes19961-0ubuntu8

Clark Lee clarkchen900 at yahoo.com.cn
Tue Sep 8 01:36:20 UTC 2009


I have tried to clean up the database as indicated in  http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding.

I have removed all previous tv program data and re-filled the database after the encoding set to latin1. Now in the mysql client, the Chinese titles/subtitles are displayed as "????".
Sadly, the Chinese titles/subtitles are still displayed as "????" in the program guide page of mythfrontend.

I have set the font as "WenQuanYi Zen Hei" (a free Chinese Font) in the boothtube-wide theme, which I am using. This Chinese font and locale are installed in system.
Plus, when I set the languaget to be "Hanzi (Chinese)", I could see the menus are diplayed with Chinese correctly.

So what do you think I could do to fix it?

Thanks very much,

Clark


----- Original Message ----
From: Clark Lee <clarkchen900 at yahoo.com.cn>
To: Discussion about mythtv <mythtv-users at mythtv.org>
Sent: Monday, September 7, 2009 1:33:45 PM
Subject: Re: [mythtv-users] UTF-8 display problem in program guide with 0.21.0+fixes19961-0ubuntu8

Thanks very much Mike for your detailed information! I would like to start over again to see how it works.

However, I am puzzled on the first answer. Let me explain a bit more.
I am using booth-wide theme; and I noiced that the default font of the scheme is defined in the menu style setting files (like mainmemu.xml) instead of the theme .xml files.
So I have change the font settings from "Arial" or "Sans" to "wqy-zenhei" (a Chinese font) in menu style files (there are three sets of them, default, classic, and DVR, if my understanding is correct).

After that I could see that the menu font is changed, and displayed with correct Chinese character.
However, I also found that even if I don't touch the menu setting files, the mythtv's menu can be displayed correctly in Chinese, but a different font. I guess this is possible because I have installed Chinese local support in my Ubuntu 9.04.

Both above facts indicate that the scheme's font should have Chinese characters.
Let me try and let you know whether it is the broken database that cause the problem.

Thanks again,

Clark


----- Original Message ----
From: Michael T. Dean <mtdean at thirdcontact.com>
To: Discussion about mythtv <mythtv-users at mythtv.org>
Sent: Monday, September 7, 2009 3:21:05 AM
Subject: Re: [mythtv-users] UTF-8 display problem in program guide with 0.21.0+fixes19961-0ubuntu8

On 09/06/2009 11:54 AM, Clark Lee wrote:
> I am using the mythtv pre-compiled version 0.21.0+fixes19961-0ubuntu8 with Ubuntu 9.04.
> The problem is that all UTF8 characters (in my case Chinese) is displayed as ?????? in the program guide.
>  

Because you're (=the theme is) using a font that doesn't provide Chinese characters.

> It is really strange. I have made sure I have done the following:
> 1) change the mythconverg database to use utf8 as default character set;
> change the default collation as utf8 as well;
>  

The default character set/collation/... needs to be latin1 for MythTV 0.21-fixes and below.

> 2) change the program table title/subtitle feilds to utf8 as well;
> change the default collation as utf8, too;
>  

This corrupted data in your database.

> Now, if I access the database from any mysql client, I could see the program title/subtitle as displayed correct.
>  

Which means your database is broken.

> And, I have installed Chinese locale, both simplied and traditional Chinese. 
> I could login to gnome with Chinese menus, and all display well.
> I set the mythtv language setting to "Hanzi (Chinese)", program guide charater as first choice "Chinese" and the second as "English".
> 
> Menus is 'default'. The Chinese menu is displayed correctly; however, if I go to the program guide page, the program names/titles are all in ??????, except for some digital figures and english characters. 
> What should I do? How the program guide language settings affect the display of program guide page? (I am puzzled here, because I think once UTF-8 is used, any character can be displayed correctly)
> 
> P.S. I used to use mythtv trunck code v0.21 and compile my self on Ubuntu 8.04, the program guide shows correctly once the database is correctly setup as above. Now to save time of compile, I switched to the pre-compiled version.

If you're just starting, start over and do /not/ mess with the database schema.  If you have a lot of historical data, revert to a backup from before you started changing the schema.  If you have no backup, you may get to start over, anyway.

See http://www.mythtv.org/wiki/Fixing_Corrupt_Database_Encoding for more information on why you're breaking Myth when you mess with the database schema/encoding.  Note that the "fix" there won't fix your database as your database is now partially corrupt.  You might be able to use the partial corruption fix, but whether or not it works is completely dependent on how much you've broken in your current database.

The easiest thing is to start over and this time, don't mess with the database schema.

Mike
_______________________________________________
mythtv-users mailing list
mythtv-users at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users


      


More information about the mythtv-users mailing list