Jump to content

charset


Waxxy

Recommended Posts

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 :)

 

Link to comment
https://forums.phpfreaks.com/topic/95861-charset/
Share on other sites

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!

Link to comment
https://forums.phpfreaks.com/topic/95861-charset/#findComment-490926
Share on other sites

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 ;)

Link to comment
https://forums.phpfreaks.com/topic/95861-charset/#findComment-491271
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.