jonas-e
11-07-2007, 04:04 PM
I have a script on my local machine which makes a dumpfile of the local database, then uploads it to the web-server by ftp. After that, a script on the web-server opens (fopen) and reads (fread) the file, splits it into individual queries and passes them through mysql_query() - thus synchronizing the web-server with the local. During that process, special characters - e.g. the Scandinavian æ, ø and å - get lost and become weird signs.
The remote dump-file is located here: http://skred-svalbard.no/dump.sql. If you open that file in a web-browser, the special characters will indeed look weird, example:
INSERT IGNORE INTO `content` VALUES (121,5,'2007-02-01','Safety training in Ny Ã…lesund', (...)
(supposed to be "Ny Ålesund"). However, if you save the file to your drive and open it with a text-editor, you will see that the characters are still intact - it's just the browser which doesn't render them.
Apparently, the characters are not passed correctly from php to the mysql server.
Any suggestions?
The remote dump-file is located here: http://skred-svalbard.no/dump.sql. If you open that file in a web-browser, the special characters will indeed look weird, example:
INSERT IGNORE INTO `content` VALUES (121,5,'2007-02-01','Safety training in Ny Ã…lesund', (...)
(supposed to be "Ny Ålesund"). However, if you save the file to your drive and open it with a text-editor, you will see that the characters are still intact - it's just the browser which doesn't render them.
Apparently, the characters are not passed correctly from php to the mysql server.
Any suggestions?