I have in the source text ( Header("Content-Type: text/html; charset=windows-1251"); ) there is a textarea where the text is entered (Russian and English letters, numbers, line breaks and + are valid). There can be both hieroglyphs and Persian phrases and all sorts of special characters.
Problem: how to remove hieroglyphs that are converted into numbers.
I thought so. source text:
sdfsdfsdf 早上 好
$sInputText=htmlspecialchars($sInputText,1251); convert hieroglyphs in essence: sdfsdfsdf 早上好
How to remove these entities?
I tried a regular program - for some reason it does not work
$Text=preg_replace('/&(.+?);/','',$Text);
&...;, and not just&. - Visman