ala888 Posted October 7, 2014 Share Posted October 7, 2014 (edited) so chinese characters generated internally in php, and also via user input display fine. but ones in the mysql server cant be displayed at all with htmlspecialchars. It should also be noted that the LIKE command in mysql also does not work with chinese/japanese/korean Edited October 7, 2014 by ala888 Link to comment Share on other sites More sharing options...
justsomeguy Posted October 7, 2014 Share Posted October 7, 2014 I'm not sure what I'm looking at in that picture, but you basically just need to make sure that everything (the database collation, meta tag/HTTP headers, file format, etc) are all UTF. I typically haven't used htmlspecialchars to print other languages, I just output the strings directly (either directly on a page, or encoded as a JSON structure, sent to Javascript, and then added somewhere). Link to comment Share on other sites More sharing options...
ala888 Posted October 7, 2014 Author Share Posted October 7, 2014 solved, the uploader client connection collation was set after the insert Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now