You are here: Re: iconv doesn't work in smarty application issue. « Smarty Templates Posts « IT news, forums, messages
Re: iconv doesn't work in smarty application issue.

Posted by Ognyan Bankov on 01/13/06 14:32

chen jin wrote:
> Hi!
> I just begin learning smarty,when I rewrite an application with
> smarty, I encounter a strange problem .the following simple
> statement,seems doesn't work:
>
> $somestr = iconv("UTF-8","GB2312",$somestr);
>
> when I move to another application directory,It works. so I think it
> just doesn't work in an smarty application directory.
> but why?how can I use iconv in smarty?
> besides,mb_convert_encoding doesn't work either.
>
> any help is highly appricated!

this doesn'y look like smarty problem, but local apache conf problem.
Check for file .htaccess in your smarty application dir (document root).
If it exists open it and look for "AddDefaultCharset UTF-8" or
similar and change it to desired charset (and restart apache).

Cheers

--
Ognyan Bankov
http://www.metatotem.com/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация