| Index
» Projekty
» phpMyEdit
» Fórum
» utf8 issues |
 |
shanghailoz
Založený: 20.04.2008
Príspevky: 2
Zaslal: 2008-04-20 01:21
Návrat hore
Odpovedať s citátom
|
I'm trying out phpMyEdit and having some strange encoding issues with Chinese.
I've set the page encoding to utf-8 in the header with
<?php
header('Content-Type: text/html; charset=utf-8');
?>
at the top of the php, the browser is showing the page encoding as utf-8 (checked in FF and Safari), so am assuming that its correct.
If I add data in / out using phpMyEdit the data goes in / out ok.
However if I go into phpMyAdmin the text goes to garbage. phpMyAdmin is in UTF-8, and I've not had a problem before adding chinese directly in tables.
Is there something i'm missing?
Or it phpMyEdit doing some encoding to the input text on post messing things up?
|
shanghailoz
Založený: 20.04.2008
Príspevky: 2
Zaslal: 2008-04-27 02:20
Návrat hore
Odpovedať s citátom
|
Hi Doug,
Actually there are a number of encodings for Chinese.
Traditional Chinese is typically BIG5.
Simplified Chinese is typically GB2312.
There are other encodings, but those are the most commonly used ones.
If you want a charset that you can mix characters with - eg French, Chinese, German etc then the best is to use UTF-8
There are a few characers missing in UTF-8 for Chinese, but those are quite escoteric, and I've only seen that once.
For anyone that has this issue in future, the problem was that Apache2 on Debian had a default character set to ISO-8851, which was overriding the meta *and* the header setting the language type of the page.
Solution - disable the default character set in Apache2
In .htaccess or in apache.conf add
AddDefaultCharset Off
Then the issue is resolved, and it will take the page encoding as per the heading or header specified.
Lawrence.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|