Re: charset problems (utf-8)

Hugo Ramos <[email protected]>
Newsgroups gmane.comp.web.zope.general
Message-ID <CAEbmhKVmebScWs3oJ+0FZPCCXqK2Of+PbCAF6WhDv3ABCBqG-Q@mail.gmail.com>
The correct prefix in the HTML header (<meta http-equiv="Content-Type"
content="text/html; charset=utf-8"> is not needed because it affects
the browser behavior only and all my 3 browsers are set to UTF-8 by
default.

I've checked and I have some templates encoded as utf-8 and others as
iso-8859-1. This happens because some of the templates (mainly the
ones encoded as iso-8859-1) come from old data.fs that I've upgraded
and maintained over the years...
But this doesn't seem to be the problem because templates encoded as
utf-8 or iso-8859-1 all have the same problem.

Any more ideas?


BTW, any1 knows about some script I can use to encode everything in my
data.fs to utf-8? That would be very useful!




On Mon, Feb 6, 2012 at 2:16 PM, Thierry Florac <[email protected]> wrote:
>
> Hi,
>
> As a french, I had many charset problems at first because of our
> accentuated characters...
>
> But your problems are quite strange if everything is encoded in UTF-8.
>
> Do you have the correct prefix in your HTML template as well as the
> correct HTTP headers ?
> Can you check that your template is really encoded in UTF-8 ??
>
> Regards,
> Thierry
>
>
> Le Mon, 06 Feb 2012 12:38:22 +0000,
>  Hugo Ramos <[email protected]> a écrit:
>
>> I guess no one has charset problems...
>>
>>
>>
>> On Thu, Feb 2, 2012 at 6:06 PM, Hugo Ramos <[email protected]> wrote:
>> > Yellow,
>> >
>> > I've noticed charset problems displaying HTML pages.
>> >
>> > Let's say I want to display a page using a DTML Method like this:
>> >
>> > <html>
>> > <head>
>> > ...
>> > </head>
>> >
>> > <body>
>> > á Á à À ç
>> > </body>
>> > </html>
>> >
>> > This page is ok and I can see the portuguese letters fine.
>> >
>> > The problem starts when I do this:
>> >
>> > <html>
>> > <head>
>> > ...
>> > </head>
>> >
>> > <body>
>> > á Á à À ç <br>
>> > <dtml-var sometextfield>
>> > </body>
>> > </html>
>> >
>> > The first line of characters shows some strange characters and the
>> > sometextfield shows up fine even if it has the same portuguese
>> > characters.
>> >
>> >
>> > sometextfield comes from a mySQL server using utf-8 as charset and
>> > collation.
>> >
>> > zope.conf has the following:
>> >
>> > rest-input-encoding utf-8
>> > rest-output-encoding utf-8
>> >
>> > The browsers also have UTF-8 as the encoding (safari, firefox and
>> > chrome) all show me the same problem.
>> >
>> > I also noticed some strange behavior...
>> > If I create "á Á à À ç" as a property field using ustring and call
>> > it as <dtml-var someproperty> also gets fine in the browser.
>> >
>> > Anyone seen this??? Double encoding maybe???
>> >
>> >
>> > TIA
>> >
>> > --
>> > Hugo Ramos - IT Project Manager
>> > E: [email protected]
>> > W: www.hugoramos.eu
>> >
>> > "Nobody expects the Spanish Inquisition!" - Monty Python's
>> >
>> > Para visualizar este email em 3D, bata com uma bola de snooker na
>> > testa e fixe o ecrã durante 5 minutos a uma distância de 20cm.



-- 
Hugo Ramos - IT Project Manager
E: [email protected]
W: www.hugoramos.eu

"Nobody expects the Spanish Inquisition!" - Monty Python's

Para visualizar este email em 3D, bata com uma bola de snooker na
testa e fixe o ecrã durante 5 minutos a uma distância de 20cm.
_______________________________________________
Zope maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope-dev )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.