Okay. This is going to be good 😉
I've a page to display product information. Including - ta-daa - the product name in different languages, a few of them which happen to include less-than-ordinary characters.
Now, it appears the russian text is in windows-1251 . I deduced this from the fact that when I changed the document charset to windows-1251, the cyrillic characters were all displayed.
That, naturally caused problems, because most of the data is to be displayed in ISO-8859-1.
No sweat, I thought, and dug out the manual. Now, there's htmlentities that's supposed to do the trick for me. So, I go and try htmlentities($string, ENT_COMPAT, 'windows-1251'); which produced - no changes. Still a mess.
I also tried to first convert_cyr_string from windows-1251 to ISO-8859-5 and then htmlentities and/or htmlspecialchars it to no avail. All I'm getting is a garbled mess, which quite frankly isn't too attractive.
I'm missing the obvious, aren't I?