0

In a project we have a form with some input fields and a textarea. It is a multilangual project and if some text is translated in German the use of chars like ü and ö are very common.

In the past we never had problems saving and retrieving these from a database. We use the utf8_general_ci collation in our tables.

Today we got a strange behaviour when submitting the form. All special chars entered in the input fields seem to dissapear.
(They are even gone in $_POST['field_name'], at first we thought it had something to do with codeigniter's input class)

However, any special chars entered in the textarea ARE in the $_POSTarray...

Did anyone have this problem before?

4

2 回答 2

0

将元标记设置为 utf8 或 iso-8859-1

<meta http-equiv="content-type" content="text/html;charset=iso-8859-1"/>
于 2013-09-25T12:37:24.733 回答
-1

添加header('Content-Type: text/html; charset=utf-8');到标题

于 2013-09-25T12:35:43.710 回答