Inserting Chinese Meta Tags
-
22-07-2019 - |
Question
I have a multilingual site and I am having a problem inserting Chinese meta tags. These are transformed into question marks.
Is there a way how I can achieve this?
Many thanks
--EDIT--
The table storing the SEF Urls is in the latin1_swedish_ci character set. How can I change this single table to utf8_general_ci without breaking the URLs?
Many thanks!
Solution
Make sure that:
- The character encoding you are using includes those characters (UTF-8 is safe)
- Your editor is configured to use that character encoding
- Your database (if these details are stored in one) is configured to use that encoding
- Your webserver is configured to output a charset parameter on the Content-type header (and it uses the correct encoding)
- Your browser is not configured to ignore the specified encoding
OTHER TIPS
Are you retrieving the data from a database? If so ensure that you connection character set is also set to utf-8. In MySQL for example you would need to issue this query before any other:
SET NAMES 'utf8';
It could be that you need to encode the Chinese characters to HTML entities, or specify a character set.
Have you checked your character set in your document headers? I usually use UTF-8 to achieve chinese character sets.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
If you're using a program like dreamweaver, make sure your files are actually being SAVED in the correct character set as well. We had a problem where characters in a dreamweaver file were coming through as ???? because the editor itself was set to iso-8859-1
Maybe your Browser - or more exactly, the font you selected to display the page - doesn't support chinese characters. What system and browser is this on?