Smarty Template Output Character garbled
I created config.conf as a configuration file, I want to use the Smarty template to import and output in the page
Php,html and config.conf are encoded as Utf8,firefox browser Unicode
The page was garbled.
I changed config.conf to ANSI encoding.
I infer that it may be related to the encoding of Smarty itself.
I copied a smarty package from someone else (my own is the latest version from the official website), the page shows normal no garbled.
Config.conf Enter information as follows
Webtitle= Dangdang, the world's largest Chinese online bookstore
copyright= Dangdang
Icpnum = 123456
HTML code
<{config_load file= "config.conf"}>
<{#webTitle #}>
---------Configuration file Demo----------
| Copyright |
<{#copyRight #}> |
<{#icpNum #}> |
PHP code
Require_once ("smarty/smarty.class.php");
$smarty =new smarty ();
$smarty->left_delimiter= "<{";
$smarty->right_delimiter= "}>";
$smarty->display ("index.html");
?>
I would like to ask if you still use the original Smarty package, how to solve the above problems, thank you
------Solution--------------------
Try to change config.conf to Utf-8 code without BOM.