You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ron Chan <rc...@i-tao.com> on 2000/05/11 08:14:33 UTC

big5 encoding


if I wanted cocoon to output the following

<meta http-equiv="Content-Type" content="text/html"; charset="big5">

what do I need to do?

i've tried

<xsl:processing-instruction name="cocoon-format">type="text/html"; charset="big5"</xsl:processing-instruction>


thanks


Ron Chan
i-tao Ltd.
4 Skyline Village
Limeharbour
London
E14 9TS
office +44 20 7537 2233
mobile +44 79 6807 2040
 

Re: big5 encoding

Posted by Paul Russell <pa...@luminas.co.uk>.
On Thu, May 11, 2000 at 07:14:33AM +0100, Ron Chan wrote:
> if I wanted cocoon to output the following
> <meta http-equiv="Content-Type" content="text/html"; charset="big5">
> what do I need to do?

That's not valid HTML markup, so Cocoon won't generate it. Do you mean:

<meta http-equiv="Content-Type" content="text/html; charset=big5">

..? If so, then you need to produce this as part of the processing
pipeline - cocoon-format will only have an effect on the Content-Type
HTTP header, it will not insert a meta tag.

You *could* implement this buy putting the following xsl template into
your stylesheet (or into another processing step, if you prefer)

<xsl:template match="html/head">
	<meta http-equiv="Content-Type" content="text/html charset=big5"/>
	<xsl:copy-of select="."/>
</xsl:template>

(Warning: the above is a guess, don't blame me if it fries your cat ;)

Having said all of the above, I'd be somewhat surprised if cocoon actually
*was* outputting big8 (more likely utf-8, I'd have thought), but I'm a
cocoon 2 peep, so I could be wrong.

-- 
Paul Russell                               <pa...@luminas.co.uk>
Technical Director,                   http://www.luminas.co.uk
Luminas Ltd.

Re: big5 encoding

Posted by Ron Chan <rc...@i-tao.com>.
Pawel

It worked !

I put this in my cocoon.properties
formatter.text/html.MIME-type = text/html;charset=Big5

and this in my XML 
 <?xml version="1.0" encoding="Big5"?>

MANY THANKS 
 
----- Original Message ----- 
From: Pawel Pesz <we...@insert.net.pl>
To: <co...@xml.apache.org>
Sent: Thursday, May 11, 2000 9:15 AM
Subject: Re: big5 encoding


> "Ron Chan" <rc...@i-tao.com> wrote:
> > if I wanted cocoon to output the following
> >
> > <meta http-equiv="Content-Type" content="text/html"; charset="big5">
> 
> > what do I need to do?
> >
> > i've tried
> >
> > <xsl:processing-instruction name="cocoon-format">type="text/html";
> charset="big5"</xsl:processing-instruction>
> 
> In addition to properly setting your content type (as
> suggested by Paul Russel) do the following:
> 
> * download Cocoon 1.7.3 and look at the "Full configurable
> formatters" section in "cocoon.properties",
> 
> * set the encoding in your XML:
> 
>   <?xml version="1.0" encoding="Big5"?>
> 
> Version 1.7.3 (when combined with Xerces, i.e. in its
> original configuration) should enable you to use any of
> the Java encodings. On the other hand I've never tried
> to output anything in Chinese, so your mileage may vary.
> 
> --
> Pawel Pesz
> InsERT.net, Wroclaw, Poland
> mailto:webmaster@insert.net.pl
> http://www.insert.net.pl
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 


Re: big5 encoding

Posted by Pawel Pesz <we...@insert.net.pl>.
"Ron Chan" <rc...@i-tao.com> wrote:
> if I wanted cocoon to output the following
>
> <meta http-equiv="Content-Type" content="text/html"; charset="big5">

> what do I need to do?
>
> i've tried
>
> <xsl:processing-instruction name="cocoon-format">type="text/html";
charset="big5"</xsl:processing-instruction>

In addition to properly setting your content type (as
suggested by Paul Russel) do the following:

* download Cocoon 1.7.3 and look at the "Full configurable
formatters" section in "cocoon.properties",

* set the encoding in your XML:

  <?xml version="1.0" encoding="Big5"?>

Version 1.7.3 (when combined with Xerces, i.e. in its
original configuration) should enable you to use any of
the Java encodings. On the other hand I've never tried
to output anything in Chinese, so your mileage may vary.

--
Pawel Pesz
InsERT.net, Wroclaw, Poland
mailto:webmaster@insert.net.pl
http://www.insert.net.pl