Opened 16 years ago
Closed 16 years ago
Last modified 16 years ago
#5364 closed enhancement (invalid)
Adapting DB to utf8 can be done without loosing non-ascii characters
Reported by: | Owned by: | Anduin Withers | |
---|---|---|---|
Priority: | major | Milestone: | 0.22 |
Component: | mythvideo | Version: | head |
Severity: | high | Keywords: | db utf8 |
Cc: | Ticket locked: | no |
Description
You are adapting DB so that columns become real "utf8" data. Great!
But if you change them directly "alter x modify coly character set utf8", mysql will translate the content (wich is in utf8, but known by mysql as latin1) from latin1 to utf8.
This can be avoided:
- Alter x modify coly blob
- Alter x modify coly varchar(128) character set utf8
This can add some nasty \0 character at the end, thus a third command can be added:
- upgrade x set coly = replace(coly, "\0", "")
This is explained in http://dev.mysql.com/doc/refman/5.0/en/charset-conversion.html
Thank you for your great job in mythtv! I hope this small info I give here can help.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Thanks, but that's that we are doing except the terminating '\0' replacement. I haven't seen that yet.
Are you sure that the terminating '\0' replacement is necessary?