[mythtv-users] Unicode characters showing up as question marks
Mr. Demeanour
mrdemeanour at jackpot.uk.net
Tue Jan 16 14:45:46 UTC 2007
Dave M G wrote:
>
> I make bilingual Japanese/English web sites, so this is something I
> have a little experience with.
I see; I apologise for trying to sell you lessons in egg-sucking.
> 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.
Are you sure? "Collation" normally refers only to the way a database
decides whether one character precedes another - for purposes of sorting
and comparison. It shouldn't be directly related to how data is encoded.
>
> Whoever designed the MySQL database left the collation settings at
> the default - which is (for some reason) "latin_swedish_ci".
That might be a default for the MySQL product itself.
>
> 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.
I can't claim to understand why that worked; but there ya go.
>
> 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.
Good.
>
> 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.
That's the OSD.
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.
The OSD font is distinct from the font used for the rest of the UI. The
UI font may be taken from the QT settings (I don't know - I'm sure
someone else here will be able to clarify). I think the OSD font is
specified explicitly in Frontend Settings. So you might have some luck
tweaking the frontend Settings to use a Unicode font that contains
Japanese characters.
--
Jack.
More information about the mythtv-users
mailing list