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...
How can retrieve Special Characters from a database table
Moderator: General Moderators
-
vcodeinfotec
- Forum Newbie
- Posts: 10
- Joined: Sat Jul 12, 2008 2:08 am
-
Amit Rathi
- Forum Newbie
- Posts: 7
- Joined: Fri Jul 25, 2008 6:17 am
- Location: India
Re: How can retrieve Special Characters from a database table
CONVERT() provides a way to convert data between different character sets
Visit : http://dev.mysql.com/doc/refman/5.0/en/ ... nvert.html
Visit : http://dev.mysql.com/doc/refman/5.0/en/ ... nvert.html
Re: How can retrieve Special Characters from a database table
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');