[mythtv-users] Unicode characters showing up as question marks
Dave M G
martin at autotelic.com
Tue Jan 16 13:16:43 UTC 2007
Mr. Demeanour,
Thank you for responding.
I've made a little progress which I suspect may be of help to other
MythTV users.
First, I checked to make sure that the program information guide created
by tv_grab_jp was, in fact, in Unicode (utf-8, actually). It seems that
it was.
Then I looked at the database directly (using phpMyAdmin), and saw that
it was all question marks. That can't be good.
I make bilingual Japanese/English web sites, so this is something I have
a little experience with. When dealing with utf-8, it's important to
make sure every step of the process is utf-8. In MySQL, there are
"collation" settings which describe the character set used for fields,
tables, and the whole database.
Whoever designed the MySQL database left the collation settings at the
default - which is (for some reason) "latin_swedish_ci".
I changed all the text fields on the "program" table to use
"utf8_unicode_ci" as their collation. Then I set the collation for the
table and the collation for the whole database to be "utf8_unicode_ci"
as well.
I wiped the table clean, and used mythfilldatabase to populate it again.
And presto - the data was stored in the database in its proper utf8
encoded Japanese.
Okay, well, but what about in the MythTV interface?
When I go to MythTV, and call up the onscreen menu ("m" button on the
keyboard), then go to "Programme Guide", it comes up in Japanese! Great.
But we're not out of the woods yet.
If I press up or down keys on the keyboard to move channels, then a
brief summary of the channel guide appears in a band at the bottom of
the screen. The channel number is in a red tab, and the summary text is
in a blue bar.
That text shows up as little boxes. Like I said, I work a lot with
encoding issues, and I know those boxes mean that the font can't find
the right character. In other words, it's not a unicode enabled font.
And this is where I hit a wall. Despite looking on the web, I couldn't
find out how to control or change the font that is used for those
particular on screen messages.
Can anyone point me in the right direction? Because if so, then I think
I may have this language display issue licked, and it would most likely
benefit anyone using non-English characters, not just Japanese.
--
Dave M G
Ubuntu 6.06 LTS
Kernel 2.6.17.7
Pentium D Dual Core Processor
PHP 5, MySQL 5, Apache 2
More information about the mythtv-users
mailing list