xenophobia Posted September 20, 2007 Share Posted September 20, 2007 I have problem here. Let say i got 2 files: a.tpl b.tpl a.tpl will contained my main HTML code. Example: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>{$page_title}</title> <link href="css/mainstyle.css" type="text/css" rel="stylesheet" /> <link href="css/common.css" type="text/css" rel="stylesheet" /> </head> <body> <table id="main_table" cellpadding="0" cellspacing="0" align="center"> <tr> <td> <div id="top_banner"> <img src="images/top_banner.png" usemap="#banner_lang" /> <map name="banner_lang"> <area shape="rect" coords="531,115,432,144" href="en/index.htm" title="English" /> <area shape="rect" coords="641,115,542,144" href="tc/index.htm" title="繁体中文" /> <area shape="rect" coords="751,115,652,144" href="sc/index.htm" title="简体中文" /> </map> </div> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0"> <tr> <td> <!-- Menu content here --> <div id="top_menu_black"> <!-- Black content --> {$page_top_menu} </div> <div id="top_menu_white"> <!-- White Content --> {$page_top_navi} </div> </td> <td rowspan="2"><img src="images/top_menu_side.jpg" /></td> </tr> <tr> <td valign="bottom"> <img src="images/top_menu_bottom.jpg" /></td> </td> </tr> </table> </td> </tr> <tr> <td> <table cellpadding="0" cellspacing="0" style="border-collapse: collapse;" border="0"> <tr> <td> <div id="content_top"> <div style="float: left; width: 192px;"> {$page_content_topleft} </div> <div style="float: right; width: 568px;"> {$page_content_topright} </div> </div> </td> <td style="background-image: url(images/content_topside.jpg); background-repeat: no-repeat; background-position: bottom;" width="9"> </td> </tr> <tr> <td> <!-- Center Content Here --> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;"> <tr> <td width="192" style="background-color: #333333; vertical-align: top;"> <div id="side_content"> {$page_content_left} </div> </td> <td width="568" style="background-color: #FFFFFF; vertical-align: top;"> <div id="main_content"> {$page_content_right} </div> </td> </tr> </table> </td> <td style="background-image: url(images/content_sidespan.jpg); background-repeat: repeat-y;" width="9"> </td> </tr> <tr> <td colspan="2"> <img src="images/content_bottom.jpg" /> </td> </tr> </table> </td> </tr> </table> </body> </html> As you can see above, there is some chinese word contained inside. If I parse this using smarty->display(a.tpl). It display perfectly. However if I wrote chinese word inside b.tpl, like this: b.tpl 報告 and include this b.tpl into a.tpl using the smarty's assign, it gives me a lots of '????'. What happened? Help is much appreciates Link to comment https://forums.phpfreaks.com/topic/69998-smarty-with-chinese-words/ Share on other sites More sharing options...
effigy Posted September 20, 2007 Share Posted September 20, 2007 Do these characters display properly outside of Smarty? Link to comment https://forums.phpfreaks.com/topic/69998-smarty-with-chinese-words/#findComment-351582 Share on other sites More sharing options...
xenophobia Posted September 20, 2007 Author Share Posted September 20, 2007 Do these character display properly outside of Smarty? Yeah, I saved this word into an .html file and try to display, it display nicely even with iso encode. Link to comment https://forums.phpfreaks.com/topic/69998-smarty-with-chinese-words/#findComment-351585 Share on other sites More sharing options...
effigy Posted September 20, 2007 Share Posted September 20, 2007 Do you have the latest version of Smarty? Have you posted here? Link to comment https://forums.phpfreaks.com/topic/69998-smarty-with-chinese-words/#findComment-351595 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.