note 63161 added to function.bin2hex

From: Date: Wed, 15 Mar 2006 00:03:06 +0000
Subject: note 63161 added to function.bin2hex
Groups: php.notes 
Request: Send a blank email to php-notes+get-105821@lists.php.net to get a copy of this message
Unicode/multibyte capable 'bin2hex' function, inspired by v0rbiz at yahoo dot com >> http://www.php.net/manual/en/function.ord.php#42778 function unibin2hex($u) { $k = mb_convert_encoding($u, 'UCS-2LE', 'UTF-8'); $k1 = bin2hex(substr($k, 0, 1)); $k2 = bin2hex(substr($k, 1, 1)); return $k2.$k1; } Note: UCS-2LE = UCS-2 little endian; UCS-2 = UTF-16 ---- Server IP: 84.18.202.180 Probable Submitter: 81.179.120.62 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.bin2hex.php Edit -- http://master.php.net/note/edit/63161 Del: integrated -- http://master.php.net/note/delete/63161/integrated Del: useless -- http://master.php.net/note/delete/63161/useless Del: bad code -- http://master.php.net/note/delete/63161/bad+code Del: spam -- http://master.php.net/note/delete/63161/spam Del: non-english -- http://master.php.net/note/delete/63161/non-english Del: in docs -- http://master.php.net/note/delete/63161/in+docs Del: other reasons-- http://master.php.net/note/delete/63161 Reject -- http://master.php.net/note/reject/63161 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#105821) next »