PEEL Shopping
Open source ecommerce : PEEL Shopping
shared.mb_unicode.php
Go to the documentation of this file.
1 <?php
18 function smarty_mb_to_unicode($string, $encoding=null) {
19  if ($encoding) {
20  $expanded = mb_convert_encoding($string, "UTF-32BE", $encoding);
21  } else {
22  $expanded = mb_convert_encoding($string, "UTF-32BE");
23  }
24  return unpack("N*", $expanded);
25 }
26 
36 function smarty_mb_from_unicode($unicode, $encoding=null) {
37  $t = '';
38  if (!$encoding) {
39  $encoding = mb_internal_encoding();
40  }
41  foreach((array) $unicode as $utf32be) {
42  $character = pack("N*", $utf32be);
43  $t .= mb_convert_encoding($character, $encoding, "UTF-32BE");
44  }
45  return $t;
46 }
47 
48 ?>
smarty_mb_from_unicode($unicode, $encoding=null)
convert unicodes to the character of given encoding
smarty_mb_to_unicode($string, $encoding=null)
convert characters to their decimal unicode equivalents

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:16 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.