Character set

Card Puncher Data Processing

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





Discover More
Card Puncher Data Processing
PHP - File System

operation in php All files are read and becomes bytes (for a string/ text, by default in the ASCII character set). file_get_contents from an URL from the same directory than the script ...
Card Puncher Data Processing
PHP - String

The string in PHP is implemented as an array of bytes with the ascii character set and an integer indicating the length of the buffer. It has no information how those bytes translate to characters, leaving...



Share this page:
Follow us:
Task Runner