You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by leo leonid <te...@leonid.de> on 2003/02/04 13:33:02 UTC

i18n: setting the client’s character coding/charset to utf

Hi,
I want to be able to display (and edit via a web form) articles in 
different languages. Latin1 encoding is not sufficient because there 
are articles in Russian and Japanese as well. To store the articles on 
the server I use the latest (7.3.1) Postgresql with Database encoding 
set to UNICODE. So far everything works fine.

In the sitemap I set the encoding as follows
	<map:serializer logger="sitemap.serializer.html" mime-type="text/html" 
name="html" pool-grow="4" pool-max="32" pool-min="4" 
src="org.apache.cocoon.serialization.HTMLSerializer">
		<buffer-size>1024</buffer-size>
		<encoding>UTF-8</encoding>
	</map:serializer>

This writes the tag in the head section of my HTML document
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

That seems to be what I need, but it seems not to be sufficient:

PROBLEM: When I call the Page in a UTF capable Browser (Mozilla 1.2) 
the character coding is set to ISO-8859-1. Only if I manually select 
Unicode from the menu everything displays fine. But if I reload the 
page the coding switches back to ISO-8859-1!

I get the same results when calling the cocoon i18n samples page.
(tested with Mozilla 1.2 on Mac OSX and Linux)

Any ideas how I can force the client to switch to UTF-8?

Thanks
/Leo



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: setting the client's character coding/charset to utf

Posted by leo leonid <te...@leonid.de>.
On Dienstag, Februar 4, 2003, at 01:45  Uhr, Konstantin Piroumian wrote:

> Hi!
>
> I couldn't reproduce this in i18n samples using:
> Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) 
> Gecko/20021130
> Win 2K
> JDK 1.3.1
> Tomcat 4.12
>

The only browser I found so far which displays the page spontaneously 
in UTF-8 is the new Safari Browser from Apple. So it seems to be a 
client problem...
...if there only wasn't the fact that the following page 
http://www.arabynet.com (I found the link in this list) displays well 
in UTF-8 in Mozilla (Linux OSX), IE5.2 (OSX), Chimera (OSX). Why??? 
This makes me think this cannot be only a client/platform problem. 
hmm...?

/Leo



> The only minor problem compared to IE 6.0 was non-readable window title
> (produced from <TITLE> element in HTML), but it can be a font problem 
> and
> definitely is not a problem of Cocoon.
>
> -- Konstantin
>
> ----- Original Message -----
> From: "leo leonid" <te...@leonid.de>
> To: <co...@xml.apache.org>
> Sent: Tuesday, February 04, 2003 15:33
> Subject: i18n: setting the client's character coding/charset to utf
>
>
>> Hi,
>> I want to be able to display (and edit via a web form) articles in
>> different languages. Latin1 encoding is not sufficient because there
>> are articles in Russian and Japanese as well. To store the articles on
>> the server I use the latest (7.3.1) Postgresql with Database encoding
>> set to UNICODE. So far everything works fine.
>>
>> In the sitemap I set the encoding as follows
>> <map:serializer logger="sitemap.serializer.html" mime-type="text/html"
>> name="html" pool-grow="4" pool-max="32" pool-min="4"
>> src="org.apache.cocoon.serialization.HTMLSerializer">
>> <buffer-size>1024</buffer-size>
>> <encoding>UTF-8</encoding>
>> </map:serializer>
>>
>> This writes the tag in the head section of my HTML document
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>>
>> That seems to be what I need, but it seems not to be sufficient:
>>
>> PROBLEM: When I call the Page in a UTF capable Browser (Mozilla 1.2)
>> the character coding is set to ISO-8859-1. Only if I manually select
>> Unicode from the menu everything displays fine. But if I reload the
>> page the coding switches back to ISO-8859-1!
>>
>> I get the same results when calling the cocoon i18n samples page.
>> (tested with Mozilla 1.2 on Mac OSX and Linux)
>>
>> Any ideas how I can force the client to switch to UTF-8?
>>
>> Thanks
>> /Leo
>>
>>
>>
>> ---------------------------------------------------------------------
>> Please check that your question  has not already been answered in the
>> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>>
>> To unsubscribe, e-mail:     <co...@xml.apache.org>
>> For additional commands, e-mail:   <co...@xml.apache.org>
>>
>>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: setting the client's character coding/charset to utf

Posted by Konstantin Piroumian <kp...@apache.org>.
Hi!

I couldn't reproduce this in i18n samples using:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130
Win 2K
JDK 1.3.1
Tomcat 4.12

The only minor problem compared to IE 6.0 was non-readable window title
(produced from <TITLE> element in HTML), but it can be a font problem and
definitely is not a problem of Cocoon.

-- Konstantin

----- Original Message -----
From: "leo leonid" <te...@leonid.de>
To: <co...@xml.apache.org>
Sent: Tuesday, February 04, 2003 15:33
Subject: i18n: setting the client's character coding/charset to utf


> Hi,
> I want to be able to display (and edit via a web form) articles in
> different languages. Latin1 encoding is not sufficient because there
> are articles in Russian and Japanese as well. To store the articles on
> the server I use the latest (7.3.1) Postgresql with Database encoding
> set to UNICODE. So far everything works fine.
>
> In the sitemap I set the encoding as follows
> <map:serializer logger="sitemap.serializer.html" mime-type="text/html"
> name="html" pool-grow="4" pool-max="32" pool-min="4"
> src="org.apache.cocoon.serialization.HTMLSerializer">
> <buffer-size>1024</buffer-size>
> <encoding>UTF-8</encoding>
> </map:serializer>
>
> This writes the tag in the head section of my HTML document
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>
> That seems to be what I need, but it seems not to be sufficient:
>
> PROBLEM: When I call the Page in a UTF capable Browser (Mozilla 1.2)
> the character coding is set to ISO-8859-1. Only if I manually select
> Unicode from the menu everything displays fine. But if I reload the
> page the coding switches back to ISO-8859-1!
>
> I get the same results when calling the cocoon i18n samples page.
> (tested with Mozilla 1.2 on Mac OSX and Linux)
>
> Any ideas how I can force the client to switch to UTF-8?
>
> Thanks
> /Leo
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>