Index
» Projects
» phpMyEdit
» Forum
» utf8 issues |
|
shanghailoz
Joined: 20 Apr 2008
Posts: 2
Posted: 2008-04-20 01:21
Back to top
Reply with quote
|
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
Joined: 20 Apr 2008
Posts: 2
Posted: 2008-04-27 02:20
Back to top
Reply with quote
|
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.
|
somydu
Joined: 22 Jan 2021
Posts: 1
Posted: 2021-01-22 07:47
Back to top
Reply with quote
|
Dear, you have to add traditionally 3 different encodings for the Chinese language. If you want to convert different languages into Chinese then BIG5 and GB3212
assignment writing australia
should be included in your model so that you will be able to perform translation.
|
Post new topic
Reply to topic
|
|
|
|