Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F1141489
modifiercompiler.from_charset.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
794 B
Subscribers
None
modifiercompiler.from_charset.php
View Options
<?php
/**
* Smarty plugin
*
* @package Smarty
* @subpackage PluginsModifierCompiler
*/
/**
* Smarty from_charset modifier plugin
*
* Type: modifier<br>
* Name: from_charset<br>
* Purpose: convert character encoding from $charset to internal encoding
*
* @author Rodney Rehm
* @param array $params parameters
* @return string with compiled code
*/
function
smarty_modifiercompiler_from_charset
(
$params
,
$compiler
)
{
if
(!
Smarty
::
$_MBSTRING
)
{
// FIXME: (rodneyrehm) shouldn't this throw an error?
return
$params
[
0
];
}
if
(!
isset
(
$params
[
1
]))
{
$params
[
1
]
=
'"ISO-8859-1"'
;
}
return
'mb_convert_encoding('
.
$params
[
0
]
.
', "'
.
addslashes
(
Smarty
::
$_CHARSET
)
.
'", '
.
$params
[
1
]
.
')'
;
}
?>
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 31, 23:50 (5 d, 2 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25965
Default Alt Text
modifiercompiler.from_charset.php (794 B)
Attached To
rZEDHG ZedLegacy
Event Timeline
Log In to Comment