You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Wolle <wg...@cip.physik.uni-wuerzburg.de> on 2002/09/09 21:16:36 UTC

german umlaut!

hi cocooners!

has anybody a proper solution for involving german umlaute in a
cocoon-framework?

i have some ideas like

1. writing the umlauts in  unicode (so creating a pdf via fop will cause
no problems)
2. writing them in tex-style like "u or "o an exchange them later in
every xsl-file
3. using extra-markups like <uml></uml>

i don't know. are there any solutions which had been tested already?

does anybody know a comfortable solution?



Auf bald

                            Wolfgang Weigel


---------------------------------------------------------------------
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: german umlaut!

Posted by Vaskin Kissoyan <vk...@lokion.com>.
Check TOMCAT / CATALINA / APP Server settings: for example:

CATALINA_OPTS=-Dfile.encoding=ISO8859_1

I'm not sure if this over-rides the settings, I would assume the xml 
file or more specific config should over-ride, but you might want to 
check what your App Server is configured /defaulted to.


J.Pietschmann wrote:
> Wolle wrote:
> 
>> as soon as i try to get an output as txt-file (e.g. on a web-browser or
>> saving the content in a file) the german umlaut produced by the ue/oe 
>> keys
>> are produced wrong (e.g. ue as A1/4). but all encodings in the xml/xsl
>> file are correct. even the settings of the webbrowser are correct.
>>
>> the aim is to produce a proper text-output for latex.
>>
>> is the text-ouput of cocoon broken?
>>
> No. It is probably outputting UTF-8. I think you can choose the
> output encoding for the text serializer, check the default, and
> try to get the encoding you need (like ISO-8859-1).
> 
> J.Pietschmann
> 
> 
> ---------------------------------------------------------------------
> 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>

-- 
Vaskin Kissoyan
Lokion Interactive
vkissoyan@lokion.com
im (aol or yahoo): vkissoyan
voice:  301-588-0404
fax:  978-926-0515
http://www.lokion.com/


---------------------------------------------------------------------
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: xsp:element root element bug?-> solved! Thanks Vadim.

Posted by Sanne de Roever <sa...@newfoundland.nl>.
Hi Vadim,

Thanks, that worked!
A already had an alternate solution using a fake <root>
element which was stripped by an xsl transformation.

This is better though!

Kind regards,

Sanne

----- Original Message -----
From: "Vadim Gritsenko" <va...@verizon.net>
To: <co...@xml.apache.org>
Sent: Thursday, September 12, 2002 4:02 PM
Subject: Re: xsp:element root element bug?


> Sanne de Roever wrote:
>
> >Hi,
> >
> >I've been using the xsp:element, and xsp:attribute tags with succes when
> >creating svg.
> >But now I would like to wrap the root element svg in such a tag, so I can
> >adjust the width and height.
> >The could/should be like this:
> >
> ><?xml version="1.0"?>
> ><xsp:page language="java"
> > xmlns:xsp="http://apache.org/xsp"
> > xmlns:xsp-request="http://apache.org/xsp/request/2.0"
> >
> >
> ><xsp:element name="svg">
> >
>
> Use <svg> here:
>
>
> <svg>
>
> > <xsp:attribute name="width">500</xsp:attribute>
> > <xsp:attribute name="height">500</xsp:attribute>
> > <xsp:element name="path">
> >  <xsp:attribute name="fill">none</xsp:attribute>
> >  <xsp:attribute name="d">M 100,200 z</xsp:attribute>
> > </xsp:element>
> > <xsp:element name="text">
> >  <xsp:attribute name="transform">matrix(1 0 0 1 0 26)</xsp:attribute>
> >  Hello world
> > </xsp:element>
> >
> </svg>
>
> ></xsp:page>
> >
>
> Vadim
>
>
>
> >My own svg is more complex, but the bottom line is that using an
xsp:element
> >tag for a root element doesn't work.
> >
> >Could this be a bug?
> >
> >Regards,
> >
> >Sanne
> >
> >
>
>
>
> ---------------------------------------------------------------------
> 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: xsp:element root element bug?

Posted by Vadim Gritsenko <va...@verizon.net>.
Sanne de Roever wrote:

>Hi,
>
>I've been using the xsp:element, and xsp:attribute tags with succes when
>creating svg.
>But now I would like to wrap the root element svg in such a tag, so I can
>adjust the width and height.
>The could/should be like this:
>
><?xml version="1.0"?>
><xsp:page language="java"
> xmlns:xsp="http://apache.org/xsp"
> xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>  
>
><xsp:element name="svg">
>

Use <svg> here:


<svg>

> <xsp:attribute name="width">500</xsp:attribute>
> <xsp:attribute name="height">500</xsp:attribute>
> <xsp:element name="path">
>  <xsp:attribute name="fill">none</xsp:attribute>
>  <xsp:attribute name="d">M 100,200 z</xsp:attribute>
> </xsp:element>
> <xsp:element name="text">
>  <xsp:attribute name="transform">matrix(1 0 0 1 0 26)</xsp:attribute>
>  Hello world
> </xsp:element>
>
</svg>

></xsp:page>
>

Vadim



>My own svg is more complex, but the bottom line is that using an xsp:element
>tag for a root element doesn't work.
>
>Could this be a bug?
>
>Regards,
>
>Sanne
>  
>



---------------------------------------------------------------------
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>


xsp:element root element bug?

Posted by Sanne de Roever <sa...@newfoundland.nl>.
Hi,

I've been using the xsp:element, and xsp:attribute tags with succes when
creating svg.
But now I would like to wrap the root element svg in such a tag, so I can
adjust the width and height.
The could/should be like this:

<?xml version="1.0"?>
<xsp:page language="java"
 xmlns:xsp="http://apache.org/xsp"
 xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>
<xsp:element name="svg">
 <xsp:attribute name="width">500</xsp:attribute>
 <xsp:attribute name="height">500</xsp:attribute>
 <xsp:element name="path">
  <xsp:attribute name="fill">none</xsp:attribute>
  <xsp:attribute name="d">M 100,200 z</xsp:attribute>
 </xsp:element>
 <xsp:element name="text">
  <xsp:attribute name="transform">matrix(1 0 0 1 0 26)</xsp:attribute>
  Hello world
 </xsp:element>
</xsp:element>
</xsp:page>

My own svg is more complex, but the bottom line is that using an xsp:element
tag for a root element doesn't work.

Could this be a bug?

Regards,

Sanne


---------------------------------------------------------------------
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: german umlaut!

Posted by Vadim Gritsenko <va...@verizon.net>.
Wolle,

I was trying to reproduce your issue but failed. Can you put together 
small test case with short XML file, sitemap snippet, actual text 
output, and desired text output, and send this as an (zip) attachement?


Thanks,
Vadim



Wolle wrote:

>hi everybody!
>
>thank you very much for the help. but i still have the problem.
>the html and pdf output is ok. as soon as i produce text-output i get
>UTF-8 code although i forced cocoon to produce iso 8859-1 by using:
>
><map:serializer logger="sitemap.serializer.text" mime-type="text/text"
>      name="text" src="org.apache.cocoon.serialization.TextSerializer">
>     <encoding>iso-8859-1</encoding>
> </map:serializer>
>
>the saved text-file is indeed  UTF-8 coded because the unix-command 'file'
>confirms the result.
>
>right now i am using a workaround by reencoding the saved file
>via: 'recode UTF-8 file.txt'
>
>
>i tested for quite a long time. this is a working solution without cocoon
>2.0.3.
>
>maybe there is more luck with cocoon 2.1.
>
>
>wolfgang weigel
>  
>




---------------------------------------------------------------------
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: german umlaut!

Posted by Wolle <wg...@cip.physik.uni-wuerzburg.de>.
hi everybody!

thank you very much for the help. but i still have the problem.
the html and pdf output is ok. as soon as i produce text-output i get
UTF-8 code although i forced cocoon to produce iso 8859-1 by using:

<map:serializer logger="sitemap.serializer.text" mime-type="text/text"
      name="text" src="org.apache.cocoon.serialization.TextSerializer">
     <encoding>iso-8859-1</encoding>
 </map:serializer>

the saved text-file is indeed  UTF-8 coded because the unix-command 'file'
confirms the result.

right now i am using a workaround by reencoding the saved file
via: 'recode UTF-8 file.txt'


i tested for quite a long time. this is a working solution without cocoon
2.0.3.

maybe there is more luck with cocoon 2.1.


wolfgang weigel




*Wolle, please check this. Maybe it can help you ;)
*
*Antonio Gallardo
*
*
*I guess Carsten helped me finding this out first ;-)
*
*So thanks to every guru here :-)
*
*Cocoon rules ;-)
*----- Original Message -----
*From: "Antonio Gallardo Rivera" <ag...@agsoftware.dnsalias.com>
*To: <co...@xml.apache.org>
*Sent: Thursday, August 29, 2002 11:25 AM
*Subject: [SUMMARY] How to encode ISO-8859-1 characters into the Database?
*
*
*Barbara:
*
*Thank you Very much! It works fine now!
*
*Antonio Gallardo
*
**********************************************************************
*SOLUTION by Barbara Post :) :
*go to the sitemap and ensure that XML and HTML serializers have the
*following
*tag:
*
*<encoding>iso-8859-1</encoding>
*
**********************************************************************
*CAUSE by Barbara Post:
*Sitemap overrides XSP/XSL encoding....
*
**********************************************************************
*PROBLEM by me :(
*
*I create the Database now using the following string:
*
*createdb -E LATIN1 -e mydb
*
*Where,
*LATIN1 is the encoding used by the database
*mydb is the name of the database
*
*Now When I wrote: "Ol�"
*When I retrieve the values there are: "Olé"
*
*Also, I used at the beginning of the XSP pages the string:
*
*<?xml version="1.0" encoding="ISO-8859-1"?>
*
*What is wrong?
*
**********************************************************************
*The first request:
*
*PLATAFORM:
*Cocoon 2.0.3
*Tomcat 4.1.9
*PostgreSQL 7.2.1.
*
*PROBLEM:
*
*If I store a string value, like "Ol�" in the Database without using Cocoon.
*I
*retrieve it and see "Ol�". The same string.
*
*With Cocoon:
*I need to store values to the Database like "Ol�". I saw that the Cocoon
*manipulate the data like UTF-8 and not in the code  ISO-8859-1. How I can
*change this feature to make Cocoon work in ISO-8859-1 code?
*
*I hope it will help anybody :) And thanks again Barbara :)
*
*Antonio Gallardo
*
*
*
*El Martes, 10 de Septiembre de 2002 04:13, Wolle escribi�:
*> hi!
*>
*> i tried to modify the sitemap.xmap in the following way:
*>
*>
*> <map:serializer logger="sitemap.serializer.text" mime-type="text/text"
*>      name="text" src="org.apache.cocoon.serialization.TextSerializer">
*>  <encoding>iso-8859-1</encoding>
*> </map:serializer>
*>
*> but the result was negativ. i wasn't able to find some other files for
*> changing the output to text-style. (i used grep for finding the string
*> UTF / iso)
*>
*> does anybody know another hint?
*>
*> wolfgang weigel
*>
*>
*> *Wolle wrote:
*> *> as soon as i try to get an output as txt-file (e.g. on a web-browser or
*> *> saving the content in a file) the german umlaut produced by the ue/oe
*> keys *> are produced wrong (e.g. ue as A1/4). but all encodings in the
*> xml/xsl *> file are correct. even the settings of the webbrowser are
*> correct. *>
*> *> the aim is to produce a proper text-output for latex.
*> *>
*> *> is the text-ouput of cocoon broken?
*> *>
*> *No. It is probably outputting UTF-8. I think you can choose the
*> *output encoding for the text serializer, check the default, and
*> *try to get the encoding you need (like ISO-8859-1).
*> *
*> *J.Pietschmann
*> *
*> *
*> *---------------------------------------------------------------------
*> *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: german umlaut!

Posted by Antonio Gallardo Rivera <ag...@agsoftware.dnsalias.com>.
Wolle, please check this. Maybe it can help you ;)

Antonio Gallardo


I guess Carsten helped me finding this out first ;-)

So thanks to every guru here :-)

Cocoon rules ;-)
----- Original Message -----
From: "Antonio Gallardo Rivera" <ag...@agsoftware.dnsalias.com>
To: <co...@xml.apache.org>
Sent: Thursday, August 29, 2002 11:25 AM
Subject: [SUMMARY] How to encode ISO-8859-1 characters into the Database?


Barbara:

Thank you Very much! It works fine now!

Antonio Gallardo

*********************************************************************
SOLUTION by Barbara Post :) :
go to the sitemap and ensure that XML and HTML serializers have the
following
tag:

<encoding>iso-8859-1</encoding>

*********************************************************************
CAUSE by Barbara Post:
Sitemap overrides XSP/XSL encoding....

*********************************************************************
PROBLEM by me :(

I create the Database now using the following string:

createdb -E LATIN1 -e mydb

Where,
LATIN1 is the encoding used by the database
mydb is the name of the database

Now When I wrote: "Olé"
When I retrieve the values there are: "Olé"

Also, I used at the beginning of the XSP pages the string:

<?xml version="1.0" encoding="ISO-8859-1"?>

What is wrong?

*********************************************************************
The first request:

PLATAFORM:
Cocoon 2.0.3
Tomcat 4.1.9
PostgreSQL 7.2.1.

PROBLEM:

If I store a string value, like "Olé" in the Database without using Cocoon.
I
retrieve it and see "Olé". The same string.

With Cocoon:
I need to store values to the Database like "Olé". I saw that the Cocoon
manipulate the data like UTF-8 and not in the code  ISO-8859-1. How I can
change this feature to make Cocoon work in ISO-8859-1 code?

I hope it will help anybody :) And thanks again Barbara :)

Antonio Gallardo



El Martes, 10 de Septiembre de 2002 04:13, Wolle escribió:
> hi!
>
> i tried to modify the sitemap.xmap in the following way:
>
>
> <map:serializer logger="sitemap.serializer.text" mime-type="text/text"
>      name="text" src="org.apache.cocoon.serialization.TextSerializer">
>  <encoding>iso-8859-1</encoding>
> </map:serializer>
>
> but the result was negativ. i wasn't able to find some other files for
> changing the output to text-style. (i used grep for finding the string
> UTF / iso)
>
> does anybody know another hint?
>
> wolfgang weigel
>
>
> *Wolle wrote:
> *> as soon as i try to get an output as txt-file (e.g. on a web-browser or
> *> saving the content in a file) the german umlaut produced by the ue/oe
> keys *> are produced wrong (e.g. ue as A1/4). but all encodings in the
> xml/xsl *> file are correct. even the settings of the webbrowser are
> correct. *>
> *> the aim is to produce a proper text-output for latex.
> *>
> *> is the text-ouput of cocoon broken?
> *>
> *No. It is probably outputting UTF-8. I think you can choose the
> *output encoding for the text serializer, check the default, and
> *try to get the encoding you need (like ISO-8859-1).
> *
> *J.Pietschmann
> *
> *
> *---------------------------------------------------------------------
> *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: german umlaut!

Posted by Wolle <wg...@cip.physik.uni-wuerzburg.de>.
hi!

i tried to modify the sitemap.xmap in the following way:


<map:serializer logger="sitemap.serializer.text" mime-type="text/text"
     name="text" src="org.apache.cocoon.serialization.TextSerializer">
 <encoding>iso-8859-1</encoding>
</map:serializer>

but the result was negativ. i wasn't able to find some other files for
changing the output to text-style. (i used grep for finding the string
UTF / iso)

does anybody know another hint?

wolfgang weigel


*Wolle wrote:
*> as soon as i try to get an output as txt-file (e.g. on a web-browser or
*> saving the content in a file) the german umlaut produced by the ue/oe keys
*> are produced wrong (e.g. ue as A1/4). but all encodings in the xml/xsl
*> file are correct. even the settings of the webbrowser are correct.
*> 
*> the aim is to produce a proper text-output for latex.
*> 
*> is the text-ouput of cocoon broken?
*> 
*No. It is probably outputting UTF-8. I think you can choose the
*output encoding for the text serializer, check the default, and
*try to get the encoding you need (like ISO-8859-1).
*
*J.Pietschmann
*
*
*---------------------------------------------------------------------
*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: german umlaut!

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Wolle wrote:
> as soon as i try to get an output as txt-file (e.g. on a web-browser or
> saving the content in a file) the german umlaut produced by the ue/oe keys
> are produced wrong (e.g. ue as A1/4). but all encodings in the xml/xsl
> file are correct. even the settings of the webbrowser are correct.
> 
> the aim is to produce a proper text-output for latex.
> 
> is the text-ouput of cocoon broken?
> 
No. It is probably outputting UTF-8. I think you can choose the
output encoding for the text serializer, check the default, and
try to get the encoding you need (like ISO-8859-1).

J.Pietschmann


---------------------------------------------------------------------
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: german umlaut!

Posted by Wolle <wg...@cip.physik.uni-wuerzburg.de>.
hi!

thanks for the many suggestions.


i tried the following solution:

*
*4. Use a proper encoding declaration which matches the actual
*    encoding of the file. For example, most platforms setup for
*    a german language environment use ISO-8859-1, and usually
*    editors use this as the default encoding. Placing
*       <?xml version="1.0" encodign="ISO-8859-1"?>
*    at the beginning of each XML file (XSLT is XML too) allows you
*    to use native encoded umlauts.


this works great producing pdf.

but i still have a problem:

as soon as i try to get an output as txt-file (e.g. on a web-browser or
saving the content in a file) the german umlaut produced by the ue/oe keys
are produced wrong (e.g. ue as A1/4). but all encodings in the xml/xsl
file are correct. even the settings of the webbrowser are correct.

the aim is to produce a proper text-output for latex.

is the text-ouput of cocoon broken?


bye

wolfgang weigel


---------------------------------------------------------------------
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: german umlaut!

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Wolle wrote:
> has anybody a proper solution for involving german umlaute in a
> cocoon-framework?

You can read the XML spec for some hints, or check some other
publishing systems, like DocBook.

> i have some ideas like
> 
> 1. writing the umlauts in  unicode (so creating a pdf via fop will cause
> no problems)
> 2. writing them in tex-style like "u or "o an exchange them later in
> every xsl-file
> 3. using extra-markups like <uml></uml>

4. Use a proper encoding declaration which matches the actual
    encoding of the file. For example, most platforms setup for
    a german language environment use ISO-8859-1, and usually
    editors use this as the default encoding. Placing
       <?xml version="1.0" encodign="ISO-8859-1"?>
    at the beginning of each XML file (XSLT is XML too) allows you
    to use native encoded umlauts.
5. Use numerical character references, for example &#148; for ö.
    You can place any unicode character in any XML file which has
    an encoding which is a superset of ASCII.
    The Unicode consortium has convenient tables for lookin up
    characters online at
      http://www.unicode.org/charts/charindex.html
6. Get a DTD with entity definitions for some characters, like
    a stripped down DocBook, or the HTML definitions (from
     http://www.w3.org/TR/html401/sgml/entities.html)
    and use the aliases defined there, for example &ouml; for ö.

J.Pietschmann


---------------------------------------------------------------------
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>