SmartyでSJISで出力する際に特定の文字での文字化けを解消するには

Smartyの標準のデリミタの{ }がSJIS文字列の中に含まれているためにコンパイル字にエラーになってしまう。

エラーとしては以下のようなExceptionが上がる。

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template

今回引っかかったのは"閲"という文字。

回避方法は2つあるらしいけど、
以下のようにデリミタを変更するほうが良いと思われる。

$smarty->left_delimiter = '{{';
$smarty->right_delimiter = '}}';



参考サイト
http://www.ninnin.net/blog/archives/000356.html