cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vlad <g...@office.zssm.zp.ua>
Subject Re: cocoon1.8 shows russian text as ???? symbols in browser
Date Thu, 17 May 2001 06:22:56 GMT
Yes I did so but XSP compiler gives a mistake:

java.lang.Exception: XSP Java Compiler: Compilation failed for _test.java
    25: Type expected.

           response.setContentType("text/html;charset=windows-1251");

                                   ^
    1 error

Vlad


"Piroumian, Konstantin" wrote:

> > Hi!
> >
> > But where should I put
> > response.setContentType("text/html;charset=windows-1251"); ?
>
> At the beginning of your XSP page:
> <xsp:page ...>
>     <page>
>         <xsp:logic>
>             response.setContentType("text/html;charset=windows-1251");
>         </xsp:logic>
>         ...
>     </page>
> </xsp:page>
>
> But, as I said before, it's not the best way of choosing the encoding. You'd
> better try to add a new formatter with encoding to cocoon.properties.
> Yesterday somebody posted an example.
>
> Kot
>
> >
> > Vlad
> >
> >
> > "Piroumian, Konstantin" wrote:
> >
> > >  Hi !
> > > >
> > > > I use russian symbols in XML but In the browser I see them as ?????
> > > > I added
> > > > <?xml version="1.0" encoding="koi8-r"?>
> > > > into my XML and XSL files
> > > > And I also added
> > > >     <meta charset="koi8-r" content="text/html"
> > > > http-equiv="Content-Type"/>
> > > > into XSL
> > >
> > > I use windows-1251 for the response and UTF-8 for the source files and I
> > > solve this problem by this, not very elegant way:
> > >
> > > response.setContentType("text/html;charset=windows-1251");
> > >
> > > A better way is to configure a special formatter in cocoon.properties
> with
> > > appropriate encoding and use <?cocoon-format type="html/loose/koi8-r" ?>
> > >
> > > I am not sure for the syntax. You can find example of usage in the
> > > cocoon.properties.
> > >
> > > Regards,
> > >     Konstantin Piroumian.
> > >
> > > ---------------------------------------------------------------------
> > > Please check that your question has not already been answered in the
> > > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> > >
> > > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> >
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> >
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


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

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


Mime
View raw message