Posting Russian Text to PHP form converted to html entities?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
philmarsay
Forum Newbie
Posts: 6
Joined: Wed Mar 21, 2007 3:26 am

Posting Russian Text to PHP form converted to html entities?

Post 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
User avatar
DigitalMind
Forum Contributor
Posts: 152
Joined: Mon Sep 27, 2010 2:27 am
Location: Ukraine, Kharkov

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

Post by DigitalMind »

use unicode
philmarsay
Forum Newbie
Posts: 6
Joined: Wed Mar 21, 2007 3:26 am

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

Post 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
User avatar
DigitalMind
Forum Contributor
Posts: 152
Joined: Mon Sep 27, 2010 2:27 am
Location: Ukraine, Kharkov

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

Post by DigitalMind »

no (php.ini)
what codepage is your browser choosing by default?

PS Do you speak Russian?
philmarsay
Forum Newbie
Posts: 6
Joined: Wed Mar 21, 2007 3:26 am

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

Post 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
User avatar
DigitalMind
Forum Contributor
Posts: 152
Joined: Mon Sep 27, 2010 2:27 am
Location: Ukraine, Kharkov

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

Post 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.
philmarsay
Forum Newbie
Posts: 6
Joined: Wed Mar 21, 2007 3:26 am

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

Post 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
Post Reply