RazZziel
15th December 2010, 20:35
Hi, I'm replicating a remote MySQL database onto a local SQLite database with QT4, SELECTing the remote data and INSERTing it into the local database.
On Windows it worked flawlessly, but on Linux I'm facing encoding problems, with stuff like Euro symbols (€) or Spanish accents (áéÃ*óú). The original MySQL database has the schema set to UTF8:
CREATE SCHEMA IF NOT EXISTS `4access` DEFAULT CHARACTER SET UTF8
Accessing directly using the mysql client, everything is fine:
mysql> select * from currency;
+-------+---------+---------+-----------+---------+---------------------+
| cu_id | cu_name | cu_code | cu_symbol | cu_rate | version |
+-------+---------+---------+-----------+---------+---------------------+
| 1 | Euro | EU | € | 1 | 2010-12-15 20:28:04 |
| 2 | Dollar | US | $ | 1.5 | 2010-12-15 20:28:04 |
| 3 | Pound | UK | £ | 0.8 | 2010-12-15 20:28:04 |
+-------+---------+---------+-----------+---------+---------------------+
But after replicating the database with my application, I open the sqlite databse and some characters are screwed:
sqlite> select * from currency;
1|Euro|EU|€|1.0|2010-12-15T20:28:04
2|Dollar|US|$|1.5|2010-12-15T20:28:04
3|Pound|UK|£|0.8|2010-12-15T20:28:04
Does anyone know where the problem can be?
On Windows it worked flawlessly, but on Linux I'm facing encoding problems, with stuff like Euro symbols (€) or Spanish accents (áéÃ*óú). The original MySQL database has the schema set to UTF8:
CREATE SCHEMA IF NOT EXISTS `4access` DEFAULT CHARACTER SET UTF8
Accessing directly using the mysql client, everything is fine:
mysql> select * from currency;
+-------+---------+---------+-----------+---------+---------------------+
| cu_id | cu_name | cu_code | cu_symbol | cu_rate | version |
+-------+---------+---------+-----------+---------+---------------------+
| 1 | Euro | EU | € | 1 | 2010-12-15 20:28:04 |
| 2 | Dollar | US | $ | 1.5 | 2010-12-15 20:28:04 |
| 3 | Pound | UK | £ | 0.8 | 2010-12-15 20:28:04 |
+-------+---------+---------+-----------+---------+---------------------+
But after replicating the database with my application, I open the sqlite databse and some characters are screwed:
sqlite> select * from currency;
1|Euro|EU|€|1.0|2010-12-15T20:28:04
2|Dollar|US|$|1.5|2010-12-15T20:28:04
3|Pound|UK|£|0.8|2010-12-15T20:28:04
Does anyone know where the problem can be?