Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

can not work with some chinese letters~

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
marco5
Smarty Rookie


Joined: 28 Jul 2003
Posts: 19

PostPosted: Wed Aug 06, 2003 11:34 am    Post subject: can not work with some chinese letters~ Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 06, 2003 11:51 am    Post subject: Reply with quote

what encoding do you use? using utf-8 your example seems to work fine.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
marco5
Smarty Rookie


Joined: 28 Jul 2003
Posts: 19

PostPosted: Wed Aug 06, 2003 12:01 pm    Post subject: Reply with quote

messju wrote:
what encoding do you use? using utf-8 your example seems to work fine.


chinese traditional(big5)
Back to top
View user's profile Send private message
marco5
Smarty Rookie


Joined: 28 Jul 2003
Posts: 19

PostPosted: Wed Aug 06, 2003 12:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Wed Aug 06, 2003 12:20 pm    Post subject: Reply with quote

hmm, i'd use recode ( http://www.gnu.org/directory/Localization/Text_converters/recode.html )

Code:
 find . -name "*.tpl" -print0| xargs -0 recode ***..utf-8
(on a backup of your pages, of course Smile )
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Bugs All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP