I have a HTML form that posts to PHP. I get a bunch of variables in PHP like for example:
$firstname = $_POST['firstname'];
etcetera. Later on, these variables are printed to a PDF file I’m generating with PHP.
However, many times the form is submitted with ‘special characters’ like ë, é, ü, etcetera. I want to preserve those characters. At this moment, those characters are printed to the PDF as:
é ë
How do I preserve the accented characters?
Make sure character encoding is correct:
utf8_encodeorutf8_decode, based on the values you get on the server