summaryrefslogtreecommitdiff
path: root/lib/smarty3/plugins/shared.mb_unicode.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smarty3/plugins/shared.mb_unicode.php')
-rw-r--r--lib/smarty3/plugins/shared.mb_unicode.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/smarty3/plugins/shared.mb_unicode.php b/lib/smarty3/plugins/shared.mb_unicode.php
index 0f790b5..7d12065 100644
--- a/lib/smarty3/plugins/shared.mb_unicode.php
+++ b/lib/smarty3/plugins/shared.mb_unicode.php
@@ -5,7 +5,6 @@
* @package Smarty
* @subpackage PluginsShared
*/
-
/**
* convert characters to their decimal unicode equivalents
*
@@ -20,12 +19,11 @@
function smarty_mb_to_unicode($string, $encoding = null)
{
if ($encoding) {
- $expanded = mb_convert_encoding($string, "UTF-32BE", $encoding);
+ $expanded = mb_convert_encoding($string, 'UTF-32BE', $encoding);
} else {
- $expanded = mb_convert_encoding($string, "UTF-32BE");
+ $expanded = mb_convert_encoding($string, 'UTF-32BE');
}
-
- return unpack("N*", $expanded);
+ return unpack('N*', $expanded);
}
/**
@@ -45,10 +43,9 @@ function smarty_mb_from_unicode($unicode, $encoding = null)
if (!$encoding) {
$encoding = mb_internal_encoding();
}
- foreach ((array) $unicode as $utf32be) {
- $character = pack("N*", $utf32be);
- $t .= mb_convert_encoding($character, $encoding, "UTF-32BE");
+ foreach ((array)$unicode as $utf32be) {
+ $character = pack('N*', $utf32be);
+ $t .= mb_convert_encoding($character, $encoding, 'UTF-32BE');
}
-
return $t;
}