Reputation: 3321
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?
Upvotes: 1
Views: 110
Reputation: 12610
Just put 'N' before your queries like
select * from User where id = N'یونیکد'
Upvotes: 1
Reputation: 16204
> CONVERT()
provides a way to convert data between different character sets
example:
SELECT CONVERT(newvalue USING utf8);
Upvotes: 1
Reputation: 51797
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...;
Upvotes: 0