Hi all, I am really having a problem with this one.
I am using utf_8 encoding and the problem is that when i enter some of the characters from serbian language (like ŠĐĆĆ..) in any varchar field in any MySQL table (using phpmyadmin), the page just doesn't recognize these and doesn't display them right on page when I do some query.
A friend of mine told me to use form for data entry, so I did that and it works fine, but now the characters in the database are not ok when I view it with phpmyadmin, so it's unusable if I want to, let's say send an email containing the data.
Is there any solution to this?
Any kind of help is greatly appreciated.
MySQL character problem
Moderator: General Moderators
Re: MySQL character problem
You need to force UTF encoding for the database connection. Make sure the following two lines are in your mysql configuration file:
If you don't have access to it, you should run the following queries before communicating with the database:
Code: Select all
default-character-set=utf8
skip-character-set-client-handshakeCode: Select all
SET CHARACTER SET 'utf8'
SET NAMES 'utf8'Re: MySQL character problem
Thanks for the quick reply, that was GREAT!!! Saved me a lot of time, thanks a lot!!!