PDA

View Full Version : Spanish Characters problem


jewelkuri
02-16-2008, 08:53 PM
I have Spanish language in casavende.eu but there r some characters still showing ???. How Can i change character_set_server : latin1 to utf8 & collation_server : latin1_swedish_ci to utf8_unicode_ci. It's necessary to fix up spanish characters problem. Can any one help me out?

arnb
02-17-2008, 07:11 AM
These are the general symptoms of a character encoding mismatch

Lége when things are in sync

Lége when UTF8 encoded data and not UTF8 in HTML meta content type

L?ge when ASCII characters greater than #127 that are not UTF-8 encoded and UTF8 in HTML meta content type

When you have your database set for UTF-8 be sure to have the following after your connection script
mysql_query("SET NAMES 'utf8'")
or die("your error message logic here");

In your HTML (assuming you serve HTML) you may use the following to set your encoding
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>

Use the PhpMyAdmin to set:
1. Your connection collation to utf-8
2. Copy a table to a test table for you initial conversion experiments
3. Select and convert various table fields to Utf-8. Warning this may cause your database to expand

There are numerous articles on the web that describe this process and the possible issues after converting in much greater detail.