Question

ini_set('mbstring.internal_encoding','UTF-8')

what does this signify at the beginning of a php file and what is it used for ?

I know that a php manual exists but it does not explain it in plain common man's language.

Was it helpful?

Solution

It defines the default internal character encoding to UTF-8 character set type.

This is used to make a site multilingual by changing the mbstring.internal_encoding value.

encoding is the character encoding name used for the HTTP input character encoding conversion, HTTP output character encoding conversion, and the default character encoding for string functions defined by the mbstring module. You should notice that the internal encoding is totally different from the one for multibyte regex.

And UTF-8 (8-bit Unicode Transformation Format) is a variable-length character encoding for Unicode.

You can change it using the iso-8859-1, UTF-8, etc.

Here is the list of Unicode character list.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top