Php - Character Set

About

This article is about character set in php.

Data in variable are stored in php in byte.

When you want to get from byte to an array of character (ie string), you need a mapping table and that's what the character set is.

In php, all base character/string functions works with the old 8bytes ascii extended character set (ie 256 characters max).

If you want to have more characters and/or supports multi-language, you need to use the multibyte function.

This means also that if your php file is saved with the default character set of the OS, a literal string value will then take the same character set than your OS.

Documentation / Reference


Powered by ComboStrap