Page 1 of 1

How can retrieve Special Characters from a database table

Posted: Sun Jul 27, 2008 11:40 pm
by vcodeinfotec
Hello...

I am trying to retrieve records from a MYSql table. And i want to update that record. when i retrieving records it shows the characters like � ? instead of ’ — “. How can insert and retrieve special characters like these?

Please help on this topic...

Re: How can retrieve Special Characters from a database table

Posted: Mon Jul 28, 2008 12:11 am
by Amit Rathi
CONVERT() provides a way to convert data between different character sets

Visit : http://dev.mysql.com/doc/refman/5.0/en/ ... nvert.html

Re: How can retrieve Special Characters from a database table

Posted: Mon Jul 28, 2008 5:49 pm
by manixrock
Usually the best way is to always work with UTF-8 encoding. Simply call this after you connect to the database (it sets the default encoding). Also make sure the text encodings in the database are all set to utf-8.

Code: Select all

mysql_query('SET NAMES utf8');