Answer the question
In order to leave comments, you need to log in
Can't beat encoding: question marks in Parserdown (markdown parser), how to remove?
I want to implement markdown on my website.
I take the text from $_POST, and put it into the Parserdown library ( https://github.com/erusev/parsedown )
It turns out like this:
Signs change to "Psi", questions in a rhombus, or some letters completely disappear.
I check the encoding before passing it to the parser - UTF-8.
I check after - UTF-8.
Everything that can be already registered, does not help.
In PHP:
setlocale(LC_ALL, 'ru_RU.utf8');
header('Content-Type: text/html; charset=utf-8', true);
mb_internal_encoding('UTF-8');
AddDefaultCharset UTF-8
<meta charset="utf-8">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question