note 58995 added to function.unicode-encode

From: Date: Wed, 23 Nov 2005 14:54:55 +0000
Subject: note 58995 added to function.unicode-encode
Groups: php.notes 
Request: Send a blank email to php-notes+get-98976@lists.php.net to get a copy of this message
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: &#336;&#377; The length of the string: 2 ---- Manual Page -- http://www.php.net/manual/en/function.unicode-encode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58995 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58995&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58995&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58995&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58995&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58995&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58995&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58995&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58995&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98976) next »