Unicode for Russian

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
deeppak
Forum Commoner
Posts: 27
Joined: Thu Apr 06, 2006 6:31 am

Unicode for Russian

Post by deeppak »

I just wanted to insert Russian data in my database(MySql) but while I insert it it get inserted easily, since I believe the data is inserted in the default format i.e. UTF-8 Unicode (utf8) i believe this is the default format but when i select it from database i could not get what was desired what is the solution for this, I am using Php as server side language..

I get ?????? as a result of select and while i look it in phpadmin the result is the same, is this the browser problem...which is not supporting the font.

or else I have to insert data in some specific uniccode..

Thanx,
Deeppak 8O
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

to get that working you have to make sure that all the links in the chain user->php->database->php->user are working in the same encoding (or perform proper conversion(s)). The behavior you observe is an indication that some link(s) do not handle encoding as intended. Usually it php<->database part. Make sure you send the SET NAMES utf8 command to your db before performing any other queries.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Does your browser render the characters at http://en.wikipedia.org/wiki/Cyrillic_alphabet correctly?
jamiel
Forum Contributor
Posts: 276
Joined: Wed Feb 22, 2006 5:17 am
Location: London, United Kingdom

Post by jamiel »

Try iconv
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post by Weirdan »

Try iconv...
...unless it's possible to get things done without it
Last edited by Weirdan on Fri Aug 11, 2006 8:09 am, edited 1 time in total.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Are you sure the form submissions are being done in UTF-8?
Post Reply