Honesty Rocks! truth rules.

The Same Charactor Shows Differently On Different Pages [solved] input of special charactor

HOME      >>       Websites and Web Designing

imjjss

I have a special charactor, when it shows up on page A, it's correct. when it shows up on page B, it's wrong. I checked both pages, I don't see too much coding difference in html or php. A main difference I found is that on page A, before submit post, there's a ajx loader, page B doesn't have this loader. I don't know if it is this ajx loader making the trouble. Could anybody help me troubleshooting this issue?


vhortex

check if both pages uses the same character setcheck if the ajax loader uses the same character setif only one page connects to a database, then check if which one have the correct character set and what character set is being feed by the database as default.


imjjss

I just checked, database uses utf8, it's set in wp-configer.php file.As for the files that generate pages, I don't know what's the charactor set. In Cpanel, when click Edit File, the default charactor encoding is us-ascii. so, I opened all this issue related files, use utf8 to open it and save it. After this done, I go to view the pages, or post something for testing, the result is the same-- one page correct, others wrong.


imjjss

Good news-- I got it sorted out, thanks for suggesting on checking the database character set. That's where things messed up.Wordpress is configued to use utf-8, but mysql seems provide more options when things transfer among browser and servers. So, most of my tables that come with wordpress default install are set to utf-8, some tables that installed by plugins are set to latin-1 because latian-1 is mysql default collation. So, the job is to change all the tables to utf8_general_ic. That sovled the problem. It could be better if had some codes automatically doing the editing or some function to set it up, but I searched online, most of solutions are out-dated, not working on wordpress current version. So, I edited things by hands. Anyway, I got it resolved. Thanks again!