I have a problem converting a string from cp1251 to utf8 ...
I need to get some names from the database, and these names are in cp1251 (I am not the one who created this database, so I canβt edit it, but I know for sure that these names are cp1251) ..
The name in the database is "Π
Π
, ΞΌΠΠ
ΞΌ, Π β " " Β° ..." I convert it to utf8 using the iconv function as follows:
iconv ("UTF-8", "CP1251 // IGNORE", $ name)
and what I have as a result is "the Internet in numbers" (this is Russian), but the first two characters are not correct ... it should be "Internet in numbers" ...
So, the last thing I need to do is somehow change these two β?β Characters. to the Russian letter "I" ... and I really donβt know how to do it ... I tried to use preg_replace, but it does not work ... or I do not use it correctly.
And I am sorry for the Russian letters, it is very difficult for me to explain what I need without showing them.
source share