Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F13144014
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
758 B
Referenced Files
None
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
Fri, Nov 21, 16:55 (19 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3165842
Default Alt Text
modifiercompiler.from_charset.php (758 B)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment