views:

100

answers:

6

Hi,

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!

A: 

It could be that you need to encode the Chinese characters to HTML entities, or specify a character set.

Peter Stuifzand
A: 

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

jerebear
Yeah I am using UTF-8 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Still doesn't show up though...
Chris
+1  A: 

Use numeric character references.

EDIT

wiki numeric character references

Convert Chinese characters to Unicode

Trick
Any more details on this?
Chris
I tried that converter but the result is still appearing in question marks. The character set is set to UTF-8. I cannot understand what's wrong...
Chris
Sometimes instead of question marks, it translates to something which doesn't make any sense.For example: I tried converting the chinese text for school of english and the result was this:ñíf!What does this mean?
Chris
If numeric character don't work, then I am clueless...
Trick
+4  A: 

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
David Dorward
Additionally in the database, beyond just the encoding, you may want to use a unicode storage type (e.g. nvarchar).
tjmoore
I am using a normal varchar. Everything seems to work fine. When I load the page source, the correct characters are being displayed in Chinese. Can some problems arise if I continue to use varchar? The database has been created by the Joomla CMS and I try to avoid such modifications where unnecessary...Thanks
Chris
RDBMS generally set character encoding at the database level, not the field level. That you are using varchar has no bearing on the problem.
David Dorward
A: 

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?

Pekka
I am using an Ubuntu Server and using Joomla as a CMS. I installed an Search engine Friendly component and in this component there are textfields where you should enter the meta keys and titles for that particular language. Chinese characters in menus and main content are working but when it comes to the page title and meta tags, it won't work. That is what I cannot understand...
Chris
Aah, then I'd bet that the component is not fully migrated to UTF-8 yet and screws the characters up from the start. Can you verify using Firefox / Firebug what encoding the form uses where you type the text in?
Pekka
+1  A: 

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';
Tom
Now I am sure that this is a dat abase problem. When I Installed joomla, some tables where in utf8 (like the content table for instance). That is why the content is being displayed properly. However, the table containing the SEF Urls is in latin format. From what I read, to change a table charset can create problems. Will problems occur with the SEF Urls if I change this table? Also this lineSET NAMES 'utf8' wont change the Database. How can I change s single table to utf8?Many thanks
Chris