Customizing SMF > SMF Coding Discussion
From SQLite to MySQL
(1/1)
emanuele:
I already had a couple of people wanting to move from SQLite to MySQL.
With the first I tried to google a bit, but I didn't find anything that worked, and so I failed in obtain a dump in a format compatible with phpMyAdmin.
Few days ago, instead (due also to the last issues with SMF backup utility that forced me to investigate how this works) I succeeded with just a couple of minor tweak to the exported db! :D
The script I used is attached here.
There is still an issues with special chars (of course), in the case I faced the most problematic was the one with the "€" symbol. The other issue was just in search log and few accented letters, strange enough in all the other tables the letters were correct... ???
Does anyone know how this can be fixed?
Funny thing is that the final backup is opened properly (with euro and all) by some editors (Kate), but not by others (Geany).
MrPhil:
Are you certain that the character encoding is what you think it is? It sounds like you've got a Euro that's maybe in CP-1252 encoding rather than true UTF-8. Latin-1 does not have a Euro, so it's probably using an MS "Smart Quotes" abberation even if it claims to be Latin-1. There are a bunch of other Smart Quotes characters that may be pulling the same trick.
emanuele:
Well...if they would be a smart quotes (...smart? From MS? :P) then they wouldn't even get to the database...no? (messages truncated?)
MrPhil:
If the euro is byte value x80, it's a CP-1252 Smart Quote (yes, that is an oxymoron, coming from MS...). It won't necessarily do any harm going in, but coming out for display it can really mess up text (i.e., be treated as a control code).
Navigation
[0] Message Index
Go to full version