Chrome error decoding accents posted via HTTP POST

Asked

Viewed 900 times

4

I have a form that makes an HTTP POST request to update the BD. During the request I noticed that the following message appeared for a field filled with accent in Chrome Dev Tool. For example, the rating is displayed as avalia%E7%E3o.

Unable to Decode value

Page and browser encoding are ISO-8859-1. PHP receives the accented text from the field as an HTML Numeric Entity, does not interpret correctly, and writes "empty" to the Database.

I have another server with the same settings and sources, and this problem does not occur, that is, evaluation (for example) is recorded correctly in the Database. Why does this problem occur? What could be the cause of my other server with the same browser and fonts working?

  • Just to better understand, you have a form and when submitting it the received data comes encoded it is this?

  • Your form already has application/x-www-form-urlencoded ?

1 answer

1

Try changing the encoding of the page that sends the variables and the one you receive for windows-1252. I believe that ISO-8859-1 does not show the special characters

  • sorry, forget to say that the header('Content-Type: text/html; charset=window-1252'); at the top of the page you receive, it also helps to display characters

Browser other questions tagged

You are not signed in. Login or sign up in order to post.