|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Wed Aug 06, 2003 11:34 am Post subject: can not work with some chinese letters~ |
|
|
test.php
[php:1:3788dff2e1]
<?php
require '../libs/Smarty.class.php';
$smarty=new smarty;
$smarty->display('for.tpl');
?>
[/php:1:3788dff2e1]
test.tpl
Code: |
{if $test eq ""}
現
{/if}
|
when i ran the script,it will be output
Fatal error: Smarty: [in for.tpl line 2]: syntax error: unrecognized tag: {/if (Smarty_Compiler.class.php, line 382) in e:\docs\user\smarty\libs\Smarty_Compiler.class.php on line 1824
i use this solution to solve the problem
{if $test eq ""}
{literal}現{/literal}
{/if}
i hope u can solve multi-character's problem!! |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Aug 06, 2003 11:51 am Post subject: |
|
|
what encoding do you use? using utf-8 your example seems to work fine. |
|
Back to top |
|
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Wed Aug 06, 2003 12:01 pm Post subject: |
|
|
messju wrote: | what encoding do you use? using utf-8 your example seems to work fine. |
chinese traditional(big5) |
|
Back to top |
|
marco5 Smarty Rookie
Joined: 28 Jul 2003 Posts: 19
|
Posted: Wed Aug 06, 2003 12:05 pm Post subject: |
|
|
messju wrote: | what encoding do you use? using utf-8 your example seems to work fine. |
u ar right!
if i was using uft-8,it will be fine!!
it is troublesome,as i need to convert to utf-8 every page! |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|