views:

133

answers:

2

Dear all, I am developing PHP/Mysql application using vertrigoserver, I need to enter the german text in Tables,The Problem is when i read the tables from php, some of character didnt show the exact typed one,Do i need additional steps to display all characters Effectively?

A: 

Did you set the correct character set on the tables when you created them?

You should set them to a character set that support ümlaut and such.

Pim Jager
+2  A: 

You should set your db fields to utf8_general and therefore force your mysql connection to use UTF8.

mysql_connect();
mysql_query("SET NAMES 'utf8'");

While displaying your results through (x)html, you also have to set the headers correctly.

Karsten
For storing german texts, the collation latin1_general[_ci] is sufficient. UTF8 adds overhead, that is not always necessary (e.g. it doubles the space needed to store a text)
Cassy
For only german texts this is true, Cassy, but imho UTF8 is a more general/international approach.
Karsten