I receive emails from the mail server and convert the message to UTF-8 encoding and save it in DB. To convert the encoding, I use mb_convert_encoding, but cannot convert gb2312 and ks_c_5601-1987 . In googling, I found that instead of gb2312 I can use CP936 and for ks_c_5601-1987 use CP949 .
Following the approach above, this would mean maintaining a separate list of encoding mappings in my code. Is there a way to normalize encoding names for names internally supported by PHP, and therefore eliminate the need to save any map locally?
Nidhi kaushal
source share