You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by 黄 海冬 <li...@hotmail.com> on 2004/02/12 03:15:33 UTC
How can I make IE display html in auto encoding utf-8?Sorry last mail use html
Hi,all:
I want to use Chinese chacter in the page and don't want it to be
encoded as someting like ⌗.
So I change configurations in web.xml:
<init-param>
<param-name>container-encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
<init-param>
<param-name>form-encoding</param-name>
<param-value>utf-8</param-value>
</init-param>
and I also change HTMLSerializer config in root sitemap.
<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">
<encoding>utf-8</encoding>
</map:serializer>
Now I can see Chinese in the page,but IE still auto encode it with
iso-8859-1,
I must change the encoding to "unicode" manully.How can I make IE auto
select
encoding in "unicode"?
the html generated list here:
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
Thanks in advance.
roy huang
guangzhou guangdong China.
roy_huang@nbmgroup.com or lingererhuang@hotmail.com
_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: How can I make IE display html in auto encoding utf-8?Sorry last
mail use html
Posted by Jaroslav Kuruc <ku...@fiit.stuba.sk>.
Make sure your servlet container doesn't add charset=ISO-8859-1 in HTTP
header. Charset in meta tag only matters if no (or the same) charset is
in HTTP header.
黄 海冬 wrote:
> Hi,all:
> I want to use Chinese chacter in the page and don't want it to be
> encoded as someting like ⌗.
> So I change configurations in web.xml:
> <init-param>
> <param-name>container-encoding</param-name>
> <param-value>utf-8</param-value>
> </init-param>
> <init-param>
> <param-name>form-encoding</param-name>
> <param-value>utf-8</param-value>
> </init-param> and I also change HTMLSerializer config in root sitemap.
> <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">
> <encoding>utf-8</encoding>
> </map:serializer>
> Now I can see Chinese in the page,but IE still auto encode it with
> iso-8859-1,
> I must change the encoding to "unicode" manully.How can I make IE auto
> select encoding in "unicode"?
> the html generated list here:
> <html>
> <head>
> <META http-equiv="Content-Type" content="text/html; charset=utf-8">
> Thanks in advance.
>
> roy huang
> guangzhou guangdong China.
> roy_huang@nbmgroup.com or lingererhuang@hotmail.com
>
> _________________________________________________________________
> 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
--
Jaroslav Kuruc
kuruc@fiit.stuba.sk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: How can I make IE display html in auto encoding utf-8?Sorry last
mail use html
Posted by Stefan Burkard <sb...@previon.ch>.
hi roy
i had the same effect with cyrillic characters to display russian language!
in effect, if i connect directly to tomcat on port 8080 everything runs
ok, because tomcat and cocoon both don't set any encoding in the
http-header. therefore the meta-tag in the html-page (set by
cocoon-serializer) is used by the browser (ie/mozilla/safari on mac/win)
to determine the encoding.
BUT if i connect to the site via apache/jk2, the browser is using
iso-8859-1. this is because the http-header has no encoding set - apache
sets then his standard-encoding of iso-8859-1.
to solve this problem quickly i set the apache-directive
"AddDefaultCharset" in the apache-virtual-host to "UTF-8". this way
apache adds the utf-8-encoding to the encoding-less http-headers of tomcat
the correct solution would be to tell cocoon to write the correct
encoding in the http-header! but i have no idea how to do this - and i
wonder that cocoon doesn't do it "out of the box"
greetings
stefan
? ?? wrote:
> Hi,all:
> I want to use Chinese chacter in the page and don't want it to be
> encoded as someting like ⌗.
> So I change configurations in web.xml:
> <init-param>
> <param-name>container-encoding</param-name>
> <param-value>utf-8</param-value>
> </init-param>
> <init-param>
> <param-name>form-encoding</param-name>
> <param-value>utf-8</param-value>
> </init-param> and I also change HTMLSerializer config in root sitemap.
> <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">
> <encoding>utf-8</encoding>
> </map:serializer>
> Now I can see Chinese in the page,but IE still auto encode it with
> iso-8859-1,
> I must change the encoding to "unicode" manully.How can I make IE auto
> select encoding in "unicode"?
> the html generated list here:
> <html>
> <head>
> <META http-equiv="Content-Type" content="text/html; charset=utf-8">
> Thanks in advance.
>
> roy huang
> guangzhou guangdong China.
> roy_huang@nbmgroup.com or lingererhuang@hotmail.com
>
> _________________________________________________________________
> ?????????????? MSN Hotmail? http://www.hotmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org