PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.smarty.general > iconv doesn't work in smarty application issue.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
iconv doesn't work in smarty application issue.

Réponse
 
LinkBack Outils de la discussion
Vieux 12/01/2006, 11h04   #1
chen jin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut iconv doesn't work in smarty application issue.

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 is highly appricated!
  Réponse avec citation
Vieux 13/01/2006, 13h32   #2
Ognyan Bankov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: iconv doesn't work in smarty application issue.

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 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/
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h07.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07864 seconds with 10 queries