[mythtv] Qt4 port: database character set change necessary

Michael T. Dean mtdean at thirdcontact.com
Sat Mar 22 19:25:24 UTC 2008


On 03/22/2008 03:07 PM, Andreas wrote:
> Am Samstag, 22. März 2008 11:00:37 schrieb Janne Grunau:
>   
>> With qt4 our current way of storing raw UTF8 byte sequences in latin1
>> encoded columns is not working anymore.
>>
>> The easiest way to get working utf8 strings is to change the database
>> character set to utf8. The alternatives we thought of have bigger
>> disadvantages than the 3 bytes per symbol utf8 in char() columns and
>> varchar() in keys and indices.
> [...]
>> I've prepared already the necessary db updates and once it is committed
>> to the branch no further db updates should be done in trunk until the
>> branch is merged to trunk.
> After my last move to a different backend machine I completely dropped the 
> database and created a new one with utf-8 as it's character set. Would the 
> db update you are planning 'screw up' my mythconverg as it already is 
> utf-8, or can I just go with it?

Myth has always required a latin1 character set (thus the "ALTER 
DATABASE mythconverg DEFAULT CHARACTER SET latin1;" in mc.sql).  If you 
actually converted your database columns (if all you did was set the 
database default, it may not have affected anything) as described at 
http://www.mythtv.org/wiki/index.php/Utf8_Text_in_OSD , now would be a 
good time to re-read that big warning at the top:

Note: The imformation[sic] on this page is unofficial and unsupported, 
the solutions used are in some cases entirely incorrect. If characters 
appear incorrectly in MythTV then please submit a bug report and only 
follow the advice below at your own risk!

Therefore, fixing the data in your database will be your responsibility, 
and I'm sure the devs won't guarantee that the changes they're making 
won't cause issues for databases that users have converted to 
unsupported character sets.

The proper approach (rather than changing your database character set) 
would have been to fix the bugs that caused the character encoding 
issues you saw.  This has been mentioned many times on both Trac 
comments and list posts.

Mike



More information about the mythtv-dev mailing list