[mythtv-users] Finally solved utf8 encoding problems, added tutorial to MythTV Wiki

Dave M G martin at autotelic.com
Tue Feb 27 22:20:03 UTC 2007


David,

Thank you for replying.
> For the global replace in the database you may be able to use the
> technique for changing hostname, described in the official
> documentation.  Basically dump the database to an sql file;  use a
> text editor to do a global replace, and then restore the database.
>   

That's a good tip. I'll look into it. If I can trim down those MySQL 
instructions, the whole process will look a lot less daunting.

> The need to change mc.sql is a bit worrying.  Might that file not get
> replaced in the upgrade?  Probably worth checking it after the upgrade
> but before running the new mythtv version for the first time?
I don't think you need to worry about it too much. If the command in 
mc.sql ever got run on your database, then it would change the collation 
settings of the database on the very top level only. In other words, the 
tables and columns within the database would remain in utf8.

Anyone could correct me here, but I believe that what's really important 
is the collation settings on the column level. That's what really 
determines how data inside any given field is stored and read. Setting 
the collation on the table level to utf8 means that the default 
collation for new columns added will be utf8. And setting the collation 
on the database level means that the default collation for new tables 
will be utf8.

So if the database got set back to latin1, and the tables and columns 
were still set to utf8, you wouldn't (?) experience any problems. If you 
added a new table after that, though, then things might get sticky, as 
the database would set the new table to use latin1 by default, and 
transactions between the new latin1 table and old utf8 tables might go 
wonky.

Bottom line, the mc.sql file, would not, on its own, be enough to 
destroy your efforts in making your tables utf8. And if you suspected it 
had been run, then you could easily reverse it by changing the database 
level collation back to utf8.

Hope that helps!

-- 
Dave M G
Ubuntu 6.10 Edgy Eft
Kernel 2.6.17.7
Pentium D Dual Core Processor
PHP 5, MySQL 5, Apache 2



More information about the mythtv-users mailing list