Query: utf8_encode
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
UTF8_ENCODE(3) 1 UTF8_ENCODE(3) utf8_encode - Encodes an ISO-8859-1 string to UTF-8SYNOPSISstring utf8_encode (string $data)DESCRIPTIONThis function encodes the string $data to UTF-8, and returns the encoded version. UTF-8 is a standard mechanism used by Unicode for encoding wide character values into a byte stream. UTF-8 is transparent to plain ASCII characters, is self-synchronized (meaning it is possible for a program to figure out where in the bytestream characters start) and can be used with normal string comparison functions for sorting and such. PHP encodes UTF-8 characters in up to four bytes, like this: UTF-8 encoding +------+-------------------------------------+---+ |bytes | | | | | | | | | bits | | | | | | | | representation | | | | | | +------+-------------------------------------+---+ | 1 | | | | | | | | | 7 | | | | | | | | 0bbbbbbb | | | | | | | 2 | | | | | | | | | 11 | | | | | | | | 110bbbbb 10bbbbbb | | | | | | | 3 | | | | | | | | | 16 | | | | | | | | 1110bbbb 10bbbbbb 10bbbbbb | | | | | | | 4 | | | | | | | | | 21 | | | | | | | | 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb | | | | | | +------+-------------------------------------+---+ Each b represents a bit that can be used to store character data.PARAMETERSo $data - An ISO-8859-1 string.RETURN VALUESReturns the UTF-8 translation of $data.SEE ALSOutf8_decode(3). PHP Documentation Group UTF8_ENCODE(3)
Related Man Pages |
---|
utf2(5) - mojave |
utf(6) - plan9 |
utf2(5) - osx |
utf8_encode(3) - php |
mb_detect_order(3) - php |