nEAnnam
nEAnnam

Reputation: 1256

Encoding from a textarea tag

Suppose in a form, you type within a textarea the character "ぎ"

At the momment of submit the text and send it to another page that will process it (i.e. action="site.php"): Will the page that send the text encode that text? or the page that recieve the text?

The point is: the form send the characters encoded(sequences of bytes) or characters to be encoded by the page that recieve that text from the form.

Is the page encoded again when is going to be sended a form? Cuz the text that will be typed is not part of the source code previously encoded.

Upvotes: 1

Views: 4999

Answers (2)

Explosion Pills
Explosion Pills

Reputation: 191729

The page that sends the text is in charge of the encoding, which as you specify can by changed by the meta charset.

Upvotes: 1

SeanCannon
SeanCannon

Reputation: 77966

You'll want to UTF8 encode that

Look at utf8_encode() and utf8_decode()

You'll also want to look into multibyte-safe functions

Upvotes: 1

Related Questions