There are many character encoding functions in PHP, especially if you have access to multibyte string functions . (mb_string is fortunately included for most PHP installations.)
What you need to do is convert the encoding of the source string to the desired encoding, but since I don't know what encoding was used / required, I can suggest that you can try using mb_convert_encoding , perhaps after using mb_detect_encoding in the source string.
By the way, I highly recommend storing all data in UTF-8 (text files, HTML encoding, data connections / data, etc.), since you will make your life much easier.
source share