You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the encoding is specified after an UTF-8 output is sent (title), the encoding of the whole document is wrong.
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<title>žšššýčř</title>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
</head>
If I put the meta before the title, everything's OK.
The text was updated successfully, but these errors were encountered:
This is an issue with DOMDocument, which dompdf relies on. I thought this issue was already addressed, but that does not appear to be the case. There are two work arounds that require minimal effort:
Placing the HTML meta element before the title element (as you indicated).
Enable the HTML5 parser (v 0.6.0 and greater), by modifying the DOMPDF_ENABLE_HTML5PARSER setting in your configuration file.
Personally, I recommend enabling the HTML5 parser. Beyond addressing this issue, it can help prevent DOMDocument processing errors by correcting syntactical problems in the HTML.
If the encoding is specified after an UTF-8 output is sent (title), the encoding of the whole document is wrong.
If I put the meta before the title, everything's OK.
The text was updated successfully, but these errors were encountered: