Warning: main() [function.main]: open_basedir restriction in effect. File(/var/data/www/ods/ods.com.ua/htdocs/htdig/header.php) is not within the allowed path(s): (/home/ods/:/tmp:/usr/local/lib/php/) in /home/ods/domains/ods.com.ua/public_html/win/eng/web-tech/php/function.utf8-encode.html on line 4

Warning: main(/var/data/www/ods/ods.com.ua/htdocs/htdig/header.php) [function.main]: failed to open stream: Operation not permitted in /home/ods/domains/ods.com.ua/public_html/win/eng/web-tech/php/function.utf8-encode.html on line 4

Warning: main() [function.include]: Failed opening '/var/data/www/ods/ods.com.ua/htdocs/htdig/header.php' for inclusion (include_path='.:/usr/local/lib/php/') in /home/ods/domains/ods.com.ua/public_html/win/eng/web-tech/php/function.utf8-encode.html on line 4
utf8_encode

utf8_encode

(PHP3 >= 3.0.6, PHP4 )

utf8_encode -- encodes an ISO-8859-1 string to UTF-8

Description

string utf8_encode (string data)

This function encodes the string data to UTF-8, and returns the encoded version. UTF-8 is a standard mechanism used by Unicodefor 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:

Table 1. UTF-8 encoding

bytesbitsrepresentation
170bbbbbbb
211110bbbbb 10bbbbbb
3161110bbbb 10bbbbbb 10bbbbbb
42111110bbb 10bbbbbb 10bbbbbb 10bbbbbb
Each b represents a bit that can be used to store character data.


Warning: main() [function.main]: open_basedir restriction in effect. File(/var/data/www/ods/ods.com.ua/htdocs/include/footer.php) is not within the allowed path(s): (/home/ods/:/tmp:/usr/local/lib/php/) in /home/ods/domains/ods.com.ua/public_html/win/eng/web-tech/php/function.utf8-encode.html on line 289

Warning: main(/var/data/www/ods/ods.com.ua/htdocs/include/footer.php) [function.main]: failed to open stream: Operation not permitted in /home/ods/domains/ods.com.ua/public_html/win/eng/web-tech/php/function.utf8-encode.html on line 289

Warning: main() [function.include]: Failed opening '/var/data/www/ods/ods.com.ua/htdocs/include/footer.php' for inclusion (include_path='.:/usr/local/lib/php/') in /home/ods/domains/ods.com.ua/public_html/win/eng/web-tech/php/function.utf8-encode.html on line 289