iconv only after PHP 4
Usage is very simple
UTF-8 encoded input
BIG5 is encoded output
$ content is the content
So if my string is UTF8
Then I want him in the above presentation BIG5 page
You can use the following manner
Usage is very simple
UTF-8 encoded input
BIG5 is encoded output
$ content is the content
So if my string is UTF8
Then I want him in the above presentation BIG5 page
You can use the following manner
echo iconv('UTF-8', 'BIG5', $content);But seriously
This encoding problem
Are usually older sites will have
Because in the past we rarely used UTF8
Now we are more commonly used UTF8
So this function is relatively small with a
Then this function has a feature
When this content conversion failed when
He will return to the string before conversion failed so far
And the use of
if (iconv('UTF-8', 'BIG5', $content))
When the conversion fails
He will return false
But in fact there are still content Oh
Here to be a reference
Message Board
Feel free to leave suggestions and share! Thanksgiving!