Waxxy Posted March 12, 2008 Share Posted March 12, 2008 Hi, I having a bit of a problem with Russian characters. I'm building a sort of English into Russian Translator. The problem is that every time i enter and English word it outputs in as Question Marks. See for yourself, type ' and ' for something or ' abandon ' http://cms-stu-iis.gre.ac.uk/cm541/index.php Ive set the collation to cp1251 in my database and that recognized the russian characters in there and i thought it would when i translate the word and it does not. I know i need to to set the charset in my php code, but i have no idea where and how to go about it. Can anyone help? Thank you Quote Link to comment Share on other sites More sharing options...
effigy Posted March 12, 2008 Share Posted March 12, 2008 I would store everything in UTF-8. Are you familiar? Quote Link to comment Share on other sites More sharing options...
Waxxy Posted March 12, 2008 Author Share Posted March 12, 2008 I would store everything in UTF-8. Are you familiar? oddly enough that database does not recognize the characters if i store them in utf-8 Quote Link to comment Share on other sites More sharing options...
haku Posted March 13, 2008 Share Posted March 13, 2008 utf-8 is not always the answer to everything. I don't know about Russian, but for east asian languages utf-8 is not recommended. OP: You need to look in your php.ini file. Look for default charset, and change that to cp1251. Then you also need to set the following meta tag in the head of your document: <meta http-equiv="Content-Type" content="text/html; charset=cp1251" /> Good luck! Quote Link to comment Share on other sites More sharing options...
effigy Posted March 13, 2008 Share Posted March 13, 2008 oddly enough that database does not recognize the characters if i store them in utf-8 What's the database? What do you mean by "not recognize"? It doesn't have a setting for UTF-8? utf-8 is not always the answer to everything. For anything outside of CJK (Chinese, Japanese, Korean), UTF-8 basically is the answer Quote Link to comment Share on other sites More sharing options...
Waxxy Posted March 13, 2008 Author Share Posted March 13, 2008 Haha, i feel like a newb now, i forgot to declare a small minor query, its working now. Thank you 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.