note 58995 deleted from function.unicode-encode by tularis
| From: | tularis@php.net | Date: | Tue, 08 Apr 2008 22:19:07 +0000 |
| Subject: | note 58995 deleted from function.unicode-encode by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-138040@lists.php.net to get a copy of this message | ||
Note Submitter: Hugo Dworak (post at o2 dot pl)
Reason: integrated
----
As for an example of the usage of the function unicode_encode:
<?php
header ('Content-Type: text/plain; charset=ISO-8859-2');
$encoded = unicode_encode ('\u0150\u0179', 'ISO-8859-2');
echo 'Unicode semantics: ', ini_get ('unicode_semantics'), PHP_EOL, 'The
string itself: ';
printf ($encoded . PHP_EOL, '%s');
echo 'The length of the string: ', strlen ($encoded);
?>
The above example will output (please note that there will be characters instead of entities in the
output):
Unicode semantics: 1
The string itself: ŐŹ
The length of the string: 2