tags:

views:

28

answers:

4

Hi all,

I don't have phpMyAdmin installed in my web site.

Sometimes I was doing some select SQL command at the backend,
but when I typed in this command to show all records from table Users:

select * from Users;


The records were printed as ???? | ??? ??? ??? |.

I don't want to make any permanent changes to the charset in the database,
so, how is it possible to temporarily displayed a few records as utf8 when needed?

A: 

take a look at the mysql CONVERT-statement, i think thats what you are looking for. if i remember right, the syntax is like this:

SELECT CONVERT(username USING utf8) FROM users...;
oezi
+1  A: 

> CONVERT()

provides a way to convert data between different character sets

example:

SELECT CONVERT(newvalue USING utf8);
OM The Eternity
A: 

Just put 'N' before your queries like

 select * from User where id = N'یونیکد'
Nasser Hadjloo
+1  A: 

Just put 'N' before your queries like

 select * from User where id = N'یونیکد'
Nasser Hadjloo