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 > Encoding.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Encoding.

Réponse
 
LinkBack Outils de la discussion
Vieux 22/11/2006, 15h50   #1
João Cândido de Souza Neto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Encoding.

I am using smarty in my system but i am facing a trouble.

I must use ISO-8859-1 encode but it seems smarty do not work with.

When i tried to view my system which is in portuguese i saw the follow
difference:

In firefox it shows: REMÉDIO PARA O GADO

In IE it shows: REM?IOS PARA O GADO

Anyone here know why?

Thanks in advance.

--
João Cândido de Souza Neto
Curitiba Online
joao@curitibaonline.com.br
(41) 3324-2294 (41) 9985-6894
http://www.curitibaonline.com.br
  Réponse avec citation
Vieux 22/11/2006, 17h07   #2
João Cândido de Souza Neto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Encoding.

E.g: When my tpl file has "Informações" and it get compiled
become "Informações".

Why it is done?

Theres a way to avoid it?

""João Cândido de Souza Neto"" <joao@curitibaonline.com.br> escreveu na
mensagem news:BF.07.34811.FC174654@pb1.pair.com...
>I am using smarty in my system but i am facing a trouble.
>
> I must use ISO-8859-1 encode but it seems smarty do not work with.
>
> When i tried to view my system which is in portuguese i saw the follow
> difference:
>
> In firefox it shows: REMÉDIO PARA O GADO
>
> In IE it shows: REM?IOS PARA O GADO
>
> Anyone here know why?
>
> Thanks in advance.
>
> --
> João Cândido de Souza Neto
> Curitiba Online
> joao@curitibaonline.com.br
> (41) 3324-2294 (41) 9985-6894
> http://www.curitibaonline.com.br

  Réponse avec citation
Vieux 23/11/2006, 02h48   #3
Cameron Perry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Encoding.

Make sure you're able to track the encoding of your data at every step:
Source data -> Database -> output.

In Firefox you can right-click the page and select "View Page
Info" (or the equivalent Portuguese), where it will tell you the
encoding of your page. Alternatively you can go to the "View" menu
and select "Character Encoding" , then select different encodings to
see maybe what's going on. Also make sure that you're sending the
proper headers/metadata from your templates.

~Cameron

On Nov 22, 2006, at 7:50 AM, João Cândido de Souza Neto wrote:

> I am using smarty in my system but i am facing a trouble.
>
> I must use ISO-8859-1 encode but it seems smarty do not work with.
>
> When i tried to view my system which is in portuguese i saw the follow
> difference:
>
> In firefox it shows: REMÉDIO PARA O GADO
>
> In IE it shows: REM?IOS PARA O GADO
>
> Anyone here know why?
>
> Thanks in advance.
>
> --
> João Cândido de Souza Neto
> Curitiba Online
> joao@curitibaonline.com.br
> (41) 3324-2294 (41) 9985-6894
> http://www.curitibaonline.com.br
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

  Réponse avec citation
Vieux 23/11/2006, 08h13   #4
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Re: Encoding.

On Wed, Nov 22, 2006 at 03:07:06PM -0200, João Cândido de Souza Neto wrote:
> E.g: When my tpl file has "Informa&ccedil;&otilde;es" and it get compiled
> become "Informações".


Smarty does not do such a conversion by default. maybe you have a
prefilter or output filter applied that affect your html entities?

> Why it is done?
>
> Theres a way to avoid it?
>
> ""João Cândido de Souza Neto"" <joao@curitibaonline.com.br> escreveu na
> mensagem news:BF.07.34811.FC174654@pb1.pair.com...
> >I am using smarty in my system but i am facing a trouble.
> >
> > I must use ISO-8859-1 encode but it seems smarty do not work with.
> >
> > When i tried to view my system which is in portuguese i saw the follow
> > difference:
> >
> > In firefox it shows: REMÉDIO PARA O GADO
> >
> > In IE it shows: REM?IOS PARA O GADO
> >
> > Anyone here know why?
> >
> > Thanks in advance.
> >
> > --
> > João Cândido de Souza Neto
> > Curitiba Online
> > joao@curitibaonline.com.br
> > (41) 3324-2294 (41) 9985-6894
> > http://www.curitibaonline.com.br

>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

  Réponse avec citation
Vieux 23/11/2006, 10h05   #5
Vicente Werner
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Re: Encoding.

I can confirm that, it's probably some kind of post processing and also due
because you don't specify the correct enconding in the html headers.


On 11/23/06, messju mohr <messju@lammfellpuschen.de> wrote:
>
> On Wed, Nov 22, 2006 at 03:07:06PM -0200, João Cândido de Souza Neto
> wrote:
> > E.g: When my tpl file has "Informa&ccedil;&otilde;es" and it get

> compiled
> > become "Informações".

>
> Smarty does not do such a conversion by default. maybe you have a
> prefilter or output filter applied that affect your html entities?
>
> > Why it is done?
> >
> > Theres a way to avoid it?
> >
> > ""João Cândido de Souza Neto"" <joao@curitibaonline.com.br> escreveu na
> > mensagem news:BF.07.34811.FC174654@pb1.pair.com...
> > >I am using smarty in my system but i am facing a trouble.
> > >
> > > I must use ISO-8859-1 encode but it seems smarty do not work with.
> > >
> > > When i tried to view my system which is in portuguese i saw the follow
> > > difference:
> > >
> > > In firefox it shows: REMÉDIO PARA O GADO
> > >
> > > In IE it shows: REM?IOS PARA O GADO
> > >
> > > Anyone here know why?
> > >
> > > Thanks in advance.
> > >
> > > --
> > > João Cândido de Souza Neto
> > > Curitiba Online
> > > joao@curitibaonline.com.br
> > > (41) 3324-2294 (41) 9985-6894
> > > http://www.curitibaonline.com.br

> >
> > --
> > Smarty General Mailing List (http://smarty.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



--
Vicente Werner y Sánchez
  Réponse avec citation
Vieux 23/11/2006, 11h37   #6
João Cândido de Souza Neto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Encoding.

If i do not put the meta tag it do not shows correctly but, when i put it,
in FF it shows correctly and put the string "" at the beginning of the
page and in IE still without showing correctly.

With the meta tag my FF gets ISO-8859-1 encode without it gets UTF-8.

"Cameron Perry" <lists@filled.us> escreveu na mensagem
news:EF7E24C5-FAA5-436B-A596-18E3E3AD638E@filled.us...
Make sure you're able to track the encoding of your data at every step:
Source data -> Database -> output.

In Firefox you can right-click the page and select "View Page
Info" (or the equivalent Portuguese), where it will tell you the
encoding of your page. Alternatively you can go to the "View" menu
and select "Character Encoding" , then select different encodings to
see maybe what's going on. Also make sure that you're sending the
proper headers/metadata from your templates.

~Cameron

On Nov 22, 2006, at 7:50 AM, João Cândido de Souza Neto wrote:

> I am using smarty in my system but i am facing a trouble.
>
> I must use ISO-8859-1 encode but it seems smarty do not work with.
>
> When i tried to view my system which is in portuguese i saw the follow
> difference:
>
> In firefox it shows: REMÉDIO PARA O GADO
>
> In IE it shows: REM?IOS PARA O GADO
>
> Anyone here know why?
>
> Thanks in advance.
>
> --
> João Cândido de Souza Neto
> Curitiba Online
> joao@curitibaonline.com.br
> (41) 3324-2294 (41) 9985-6894
> http://www.curitibaonline.com.br
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

  Réponse avec citation
Vieux 23/11/2006, 11h47   #7
João Cândido de Souza Neto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Re: Encoding.

I do not have any prefilter defined.

I shall put bellow an little example in which Smarty makes chamge.

In my .tpl file i have got:

<td class="top_texto">
<a href="?modulo=conteudo&acao=informacoes">
Central de Informa&ccedil;&otilde;es
</a>
</td>

When Smarty compiles that and i look at the source code it becomes:

<td class="top_texto">
<a href="?modulo=conteudo&acao=informacoes">
Central de Informações
</a>
</td>

How can i see, Smarty makes that change itself withou needing a prefilter.

"messju mohr" <messju@lammfellpuschen.de> escreveu na mensagem
news:20061123081343.GC581@localhost.localdomain...
> On Wed, Nov 22, 2006 at 03:07:06PM -0200, João Cândido de Souza Neto
> wrote:
>> E.g: When my tpl file has "Informa&ccedil;&otilde;es" and it get compiled
>> become "Informações".

>
> Smarty does not do such a conversion by default. maybe you have a
> prefilter or output filter applied that affect your html entities?
>
>> Why it is done?
>>
>> Theres a way to avoid it?
>>
>> ""João Cândido de Souza Neto"" <joao@curitibaonline.com.br> escreveu na
>> mensagem news:BF.07.34811.FC174654@pb1.pair.com...
>> >I am using smarty in my system but i am facing a trouble.
>> >
>> > I must use ISO-8859-1 encode but it seems smarty do not work with.
>> >
>> > When i tried to view my system which is in portuguese i saw the follow
>> > difference:
>> >
>> > In firefox it shows: REMÉDIO PARA O GADO
>> >
>> > In IE it shows: REM?IOS PARA O GADO
>> >
>> > Anyone here know why?
>> >
>> > Thanks in advance.
>> >
>> > --
>> > João Cândido de Souza Neto
>> > Curitiba Online
>> > joao@curitibaonline.com.br
>> > (41) 3324-2294 (41) 9985-6894
>> > http://www.curitibaonline.com.br

>>
>> --
>> Smarty General Mailing List (http://smarty.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php

  Réponse avec citation
Vieux 23/11/2006, 11h51   #8
messju mohr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Encoding.

On Thu, Nov 23, 2006 at 09:37:46AM -0200, João Cândido de Souza Neto wrote:
> If i do not put the meta tag it do not shows correctly but, when i put it,
> in FF it shows correctly and put the string "" at the beginning of the


This is a BOM (http://unicode.org/unicode/faq/utf_bom.html#22) so you
tell the browser: "Here comes a Unicode Data stream". That's definitly
not what you want if your encoding is ISO-8859-1.

> page and in IE still without showing correctly.
>
> With the meta tag my FF gets ISO-8859-1 encode without it gets UTF-8.
>
> "Cameron Perry" <lists@filled.us> escreveu na mensagem
> news:EF7E24C5-FAA5-436B-A596-18E3E3AD638E@filled.us...
> Make sure you're able to track the encoding of your data at every step:
> Source data -> Database -> output.
>
> In Firefox you can right-click the page and select "View Page
> Info" (or the equivalent Portuguese), where it will tell you the
> encoding of your page. Alternatively you can go to the "View" menu
> and select "Character Encoding" , then select different encodings to
> see maybe what's going on. Also make sure that you're sending the
> proper headers/metadata from your templates.
>
> ~Cameron
>
> On Nov 22, 2006, at 7:50 AM, João Cândido de Souza Neto wrote:
>
> > I am using smarty in my system but i am facing a trouble.
> >
> > I must use ISO-8859-1 encode but it seems smarty do not work with.
> >
> > When i tried to view my system which is in portuguese i saw the follow
> > difference:
> >
> > In firefox it shows: REMÉDIO PARA O GADO
> >
> > In IE it shows: REM?IOS PARA O GADO
> >
> > Anyone here know why?
> >
> > Thanks in advance.
> >
> > --
> > João Cândido de Souza Neto
> > Curitiba Online
> > joao@curitibaonline.com.br
> > (41) 3324-2294 (41) 9985-6894
> > http://www.curitibaonline.com.br
> >
> > --
> > Smarty General Mailing List (http://smarty.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

  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 12h58.


Édité par : vBulletin® version 3.7.2
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
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,19326 seconds with 16 queries