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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.