问题描述:

I want to make a string to utf8 encoded, but I don't know what the original charset it is.

The original charset of string may be GBK, iso-8859-1, or others I don't know.

I use mb_detect_encoding($content, 'UTF-8', true) and iconv($original, "UTF-8", $content);

How to get the original encoding ?

网友答案:

I think this is maybe useful http://php.net/manual/en/function.utf8-encode.php

相关阅读:
Top