views:

1207

answers:

4

Hi there!! I have characters like ó, ö and so on. When i insert these data into the table it displays like these ó ö. I am using php mysql. Is there any solution for this???

Thank you in advance

+1  A: 

Please specify what DB system you're using -- each has its preferred way to specify character encoding. Then, set the character encoding of your DB to the same you're using for sending it the strings -- the latter may depend on your language and library, so if you want detailed help you'd better specify those too.

Alex Martelli
Thank you Alex!! I am using php mysql.
For PHP and character encodings study http://www.phpwact.org/php/i18n/charsets -- utf8_encode when going to the DB, and utf8_decode when coming back, are probably what you want (if the MySQL table is in UTF8 as seems likely), but you need the background knowledge given by that document.
Alex Martelli
A: 

Depends on your database engine. For MySQL, the solution is usually to set your table's default character set, like so:

CREATE TABLE `foo` (
    `bar` varchar(20) not null
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
chaos
A: 

Run this query to check MySQL's various character encoding settings:

show variables like '%character%'

I would say you've probably got one or more of those set to latin1. Also, try executing these queries prior to inserting/fetching data:

SET NAMES utf8
SET CHARACTER SET utf8
karim79
A: 

Dear Alex,

I want to insert french characters in access database using ASP. Can you please suggest me what can i do??

Awaiting your reply

Many Thanks

Shaheen

shaheen