Page 1 of 1

Posting Russian Text to PHP form converted to html entities?

Posted: Fri Oct 01, 2010 7:02 am
by philmarsay
Hi,

I have a web based application, written in PHP, with a MySQL back-end.

I have a HTML form which submits content to PHP which in turn then saves it to the database.

I am having a problem passing in russian text... e.g. Нет но идея свою. Во них быть продукт, они ты сраз...

as soon as it is posted to the form, and hits the _REQUEST variable, it is all converted in to HTML entities e.g. "Нет но идея свою. Во ни&#....."

Any idea how I can change this behaviour so that it actually posts the russian characters??

thanks,

Phil

Re: Posting Russian Text to PHP form converted to html entit

Posted: Fri Oct 01, 2010 7:17 am
by DigitalMind
use unicode

Re: Posting Russian Text to PHP form converted to html entit

Posted: Fri Oct 01, 2010 8:32 am
by philmarsay
Hi, thanks, can you elaborate a little, please?

I have, to my knowledge, setup my PHP code to use utf-8 as the default character set.

Do I need to change something in the setup of PHP itself (php.ini)?

Thanks, I appreciate any help you can offer!

Phil

Re: Posting Russian Text to PHP form converted to html entit

Posted: Fri Oct 01, 2010 8:40 am
by DigitalMind
no (php.ini)
what codepage is your browser choosing by default?

PS Do you speak Russian?

Re: Posting Russian Text to PHP form converted to html entit

Posted: Fri Oct 01, 2010 9:55 am
by philmarsay
OK, please treat me like an idiot (I'm not one, but for the purposes of this... :D )

How do I check that? (what codepage is your browser choosing by default?)

And no, I don't speak or understand russian at all. I'm doing this for someone else, who does!

thanks,

Phil

Re: Posting Russian Text to PHP form converted to html entit

Posted: Fri Oct 01, 2010 2:58 pm
by DigitalMind
philmarsay wrote:How do I check that? (what codepage is your browser choosing by default?)
View -> Codepage

somewhere there. My browsers are in russian.

Re: Posting Russian Text to PHP form converted to html entit

Posted: Mon Oct 04, 2010 6:20 am
by philmarsay
Thanks, by setting my browser to UTF-8, and russian, it now works.

Thanks for your help, I would not have thought to look at the browser itself!

Phil