![]() | |
#11
| |||
| |||
|
|
I checked these earlier and changed them. Viewing the database properties through Navicat, they are: Character set: utf8 -- UTF-8 Unicode Collation: utf8_general_ci That is what the original db is - getting that info from querying the 'INFORMATION_SCHEMA.COLUMNS' table ... CHARACTER_SET_NAME: utf8 - utf8_general_ci DEFAULT_COLLATE_NAME: utf8 - utf8_general_ci You need to be concerned with: - The character set of the connection. ("SET NAMES utf8") |

#12
| ||||||
| ||||||
|
|
You need to be concerned with: - The character set of the connection. ("SET NAMES utf8") This was the solution!!! I put the line mysql_query("SET NAMES 'utf8'") after mysql_select_db(... Why this should be the difference - |
|
needed for it to work on another site from the same hosting company (with identical phpinfo), I do not know. |
|
But this has not got all the characters displaying properly. That is the Greek, Hebrew, and Coptic. Whether this is the only, or the absolutely correct solution, I'm not sure. But it works! ![]() |
|
It still doesn't get the Coptic to appear correctly in MS IE, so I'll have to play around with that. The Greek and Hebrew are still OK in MS IE though. Could it be something to do with the data coming from a Windows source, rather than from a Linux based server, I wonder? Or from a remote source over the internet, rather than from the same hosting company? |
|
And I had gone through creating a new table, populating it, and including your "André". As it happened, the correct encoding appeared. |
|
Very many thanks to all who contributed suggestions. I have learnt quite a bit from all of this testing (including spending lots of time messing around with different variations on the sql dumps, and importing, etc.) All responses very much appreciated. |
#13
| |||||
| |||||
|
|
On 03/08/12 18:14, Iain wrote: I have tried several new dumps, with importing them and maybe with one or two tweeks, but still no success. Make a dump and use --skip-set-charset and see if it works better, there are always issues with charsets when export/import, I hope this could improve in mysql. Other options is that you use sed to replace the charset in the dump you made. sed 's/Latin1/utf8/g' -i yourdatabasedump.sql and then import it. |
.|
i | t | +------+------+ 1 | é | +------+------+ |
|
i | t | +------+------+ 1 | é | +------+------+ |
|
(1,'..');./*!400| 00000570 30 30 20 41 4c 54 45 52 20 54 41 42 4c 45 20 60 |00 ALTER |
|
');./*!40000 ALT| ..... |
![]() |
| Thread Tools | |
| Display Modes | |
| |