nati Posted October 4, 2008 Share Posted October 4, 2008 Hello, I have problem with charset for serbian letters. This subject was discussed many times, but even after I used the code other suggested, special letters are still problematic. The situation is next: 1) I have MySQL database, charset is set to utf8, collate is set to ut8_general_ci. 2) In my php files witch communicate to database, I put next code: mysql_query('SET CHARACTER SET utf8', $db); mysql_query('SET NAMES utf8', $db); mysql_connect is stored in $db. 3) Also, I put in meta tags next code: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> Now, I have 2 results, depending on Internet Explorer encoding. If encoding is UTF8, I can see special letters in data retreived from database properly, but in ordinary text on page I'm getting questionmarks instead of special letters. When I put Central European encoding in IE, situation is opposite, ordinary text is ok, but data retrieved from database have wierd symbols. Anyone has an idea how to solve this, please? Tnx in advance, Nati Quote Link to comment Share on other sites More sharing options...
corbin Posted October 5, 2008 Share Posted October 5, 2008 Either everything needs to be UTF8 or everything needs to be CEuropean.... Quote Link to comment Share on other sites More sharing options...
nati Posted October 6, 2008 Author Share Posted October 6, 2008 I agree with that, of course. But even when everything is utf8, problem exists, that's what makes me clueless. Quote Link to comment Share on other sites More sharing options...
haku Posted October 6, 2008 Share Posted October 6, 2008 It could be a utf-8 problem. utf-8 isn't as complete as everyone thinks. It has most characters from each alphabet, but it doesn't have them all. Quote Link to comment Share on other sites More sharing options...
nati Posted October 6, 2008 Author Share Posted October 6, 2008 So, what should I do, anyone has idea? Quote Link to comment Share on other sites More sharing options...
corbin Posted October 8, 2008 Share Posted October 8, 2008 Unicode? You can't just make sure the encoding client side is UTF-8 by the way, you have ot make sure you're outputting in UTF-8. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.