There are texts in utf-8 format, they include unique characters (for example, Polish: ż ę ż etc.). How can I recode them to cp-1251 with minimal losses? I mean to encode unique characters in an html entity (for example: ξ).
My code looks like this:
$outputText = str_replace( array('<', '>'), array('<', '>'), htmlentities( iconv( "utf-8", DEFAULT_CHARSET, $inputText), ENT_NOQUOTES, DEFAULT_CHARSET ) ); PS I heard about the possibility of displaying blocks in a different encoding on pages with cp-1251 encoding - UTF-8, for example. How to do it? And will this help me?