converting data to utf-8

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
orlandinho
Forum Newbie
Posts: 18
Joined: Mon Feb 12, 2007 9:50 pm

converting data to utf-8

Post by orlandinho »

i have loaded data originally taken from sql server 2000 to mysql
in mysql my tables are with utf-8 charset
i have an application that uses this data , when i define UTF-8 charset for my web pages i don´t see characters like Ñ correctly,i see something like ' щ ' instead of ' ñ ', when i define ISO-8859-1 for my web pages i can see ' ñ ' in a correct way but when i search into some table from my site it takes n like ñ and bring me results containing n and ñ

i tried this : pass table to a text file, convert it in linux with iconv -f iso-8859-1 -t utf8 'file.txt' but it seems to be the same

how can i change the characters in my tables in a way my utf-8 tables recognize ñ as ñ?
mentor
Forum Contributor
Posts: 100
Joined: Sun Mar 11, 2007 11:10 am
Location: Pakistan

Post by mentor »

This may not be your answer but you can try.

If you are using PHP, did you try converting connection type to utf8? If not then run this after connecting to DB.

Code: Select all

mysql_query("SET NAMES utf8");
Post Reply