You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Romayev <ro...@yahoo.com> on 2002/09/18 01:30:37 UTC

Encoding problem

Hello,

I'm having what seems to be an encoding problem -- not
sure it's related to Cocoon, but... ;)

<xsl:for-each select="//city-name">
 <a href="city-detail?city-name={.}"><xsl:value-of
select="."/></a><br/>
</xsl:for-each>

All my xml is UTF-8, it work in English, but not in
Russian.  Any ideas?

Thanks,
-Alex


---------------------------------------------------------------------
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: Encoding problem

Posted by Alex Romayev <ro...@yahoo.com>.
--- Vadim Gritsenko <va...@verizon.net>
wrote:
> Alex Romayev wrote:
> 
> >--- Vadim Gritsenko <va...@verizon.net>
> >wrote:
> >  
> >
> >>Alex Romayev wrote:
> >>
> >>    
> >>
> >>>--- Vadim Gritsenko <va...@verizon.net>
> >>>wrote:
> >>>
> ...
> 
> >>>Good point, I may have a problem in another
> stylesheet
> >>>
> >>>(part of the pipeline that responds to the url in
> >>>question):
> >>>
> >>>This parameter is set by the href:
> >>><xsl:param name="city"/>
> >>>
> >>>This should match and does it correctly when
> 'Delhi'
> >>>
> >>>is passed, but does not match when I pass '����':
> >>>
> >>><xsl:apply-templates select="//city[name=$city]/>
> >>>
> >>>      
> >>>
> >>Check what encoding is used to decode URL. It
> should
> >>be container 
> >>encoding, but you need UTF-8.
> >>    
> >>
> >
> >I'm using tomcat4.0.4, do you know how to change it
> of
> >the top of your head?
> >
> 
> I've not played with encoding of the URL itself, but
> about request 
> parameters see below...
> 
> 
> >>PS In any case, non US-ASCII symbols in URL is not
> a
> >>good idea.
> >>    
> >>
> >
> >What would be an alternative?  Basically, I need to
> >search agains an XML file, which has city as one of
> >the elements, and return all records related to the
> >sity.  On the page, there is a list of 'favourite
> >city' links.
> >
> >Also, I'm about to try recording information using
> >Cocoon, so I haven't tried to use forms yet, but
> >wouldn't I run into the same problem? 
> >
> 
> Ok, UTF symbols should be fine in the forms (GET or
> POST) if you to:
> 
> (1) Serialize HTML form as UTF-8 (or any other
> encoding), and (2) set 
> request encoding: request.setEncoding("UTF-8") (or
> any other encoding, 
> same as in (1)) *before* any access to the request
> parameters. This can 
> be done from an action.

Thanks, I'll try that.

> 
> After that, request.getParameter() should work Ok,
> and if you to get 
> request parameter in the sitemap and pass it to the
> XSLT, it also should 
> work ok.
> 
> 
> BTW, this was already answered today.

Sorry, I should have caught it;) Thanks for your
help...

> 
> 
> Vadim
> 
> 
> >>Vadim
> >>
> >>    
> >>
> >>>-Alex
> >>>
> >>>      
> >>>
> ...
> 
> 
>
---------------------------------------------------------------------
> 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: Encoding problem

Posted by Vadim Gritsenko <va...@verizon.net>.
Alex Romayev wrote:

>--- Vadim Gritsenko <va...@verizon.net>
>wrote:
>  
>
>>Alex Romayev wrote:
>>
>>    
>>
>>>--- Vadim Gritsenko <va...@verizon.net>
>>>wrote:
>>>
...

>>>Good point, I may have a problem in another stylesheet
>>>
>>>(part of the pipeline that responds to the url in
>>>question):
>>>
>>>This parameter is set by the href:
>>><xsl:param name="city"/>
>>>
>>>This should match and does it correctly when 'Delhi'
>>>
>>>is passed, but does not match when I pass 'Äåëè':
>>>
>>><xsl:apply-templates select="//city[name=$city]/>
>>>
>>>      
>>>
>>Check what encoding is used to decode URL. It should
>>be container 
>>encoding, but you need UTF-8.
>>    
>>
>
>I'm using tomcat4.0.4, do you know how to change it of
>the top of your head?
>

I've not played with encoding of the URL itself, but about request 
parameters see below...


>>PS In any case, non US-ASCII symbols in URL is not a
>>good idea.
>>    
>>
>
>What would be an alternative?  Basically, I need to
>search agains an XML file, which has city as one of
>the elements, and return all records related to the
>sity.  On the page, there is a list of 'favourite
>city' links.
>
>Also, I'm about to try recording information using
>Cocoon, so I haven't tried to use forms yet, but
>wouldn't I run into the same problem? 
>

Ok, UTF symbols should be fine in the forms (GET or POST) if you to:

(1) Serialize HTML form as UTF-8 (or any other encoding), and (2) set 
request encoding: request.setEncoding("UTF-8") (or any other encoding, 
same as in (1)) *before* any access to the request parameters. This can 
be done from an action.

After that, request.getParameter() should work Ok, and if you to get 
request parameter in the sitemap and pass it to the XSLT, it also should 
work ok.


BTW, this was already answered today.


Vadim


>>Vadim
>>
>>    
>>
>>>-Alex
>>>
>>>      
>>>
...


---------------------------------------------------------------------
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: Encoding problem

Posted by Alex Romayev <ro...@yahoo.com>.
--- Vadim Gritsenko <va...@verizon.net>
wrote:
> Alex Romayev wrote:
> 
> >--- Vadim Gritsenko <va...@verizon.net>
> >wrote:
> >  
> >
> >>Alex Romayev wrote:
> >>
> >>    
> >>
> >>>--- Vadim Gritsenko <va...@verizon.net>
> >>>wrote:
> >>> 
> >>>
> >>>      
> >>>
> >>>>Alex Romayev wrote:
> >>>>
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>>>Let me be more specific and also simplify the
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>example:
> >>>>   
> >>>>
> >>>>...
> >>>>
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>>>Does not work:
> >>>>>
> >>>>><xsl:param name="city" select="'����'"/>
> >>>>>
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>Are these funny characters above in UTF-8? Does
> >>>>        
> >>>>
> >>your
> >>    
> >>
> >>>>XSL has 
> >>>>encoding="UTF-8" on the top?
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>Yes.  Also, note that this only happens to the
> href
> >>>attribute, the value of the <a> element comes out
> >>>correctly.
> >>>
> >>>      
> >>>
> >>Then what do you want? It works correctly. See 
> >>http://www.w3.org/Addressing/rfc1738.txt
> >>
> >>Vadim
> >>    
> >>
> >
> >Good point, I may have a problem in another
> stylesheet
> >(part of the pipeline that responds to the url in
> >question):
> >
> >This parameter is set by the href:
> ><xsl:param name="city"/>
> >
> >This should match and does it correctly when
> 'Delhi'
> >is passed, but does not match when I pass '����':
> >
> ><xsl:apply-templates select="//city[name=$city]/>
> >
> 
> Check what encoding is used to decode URL. It should
> be container 
> encoding, but you need UTF-8.

I'm using tomcat4.0.4, do you know how to change it of
the top of your head?


> 
> PS In any case, non US-ASCII symbols in URL is not a
> good idea.

What would be an alternative?  Basically, I need to
search agains an XML file, which has city as one of
the elements, and return all records related to the
sity.  On the page, there is a list of 'favourite
city' links.

Also, I'm about to try recording information using
Cocoon, so I haven't tried to use forms yet, but
wouldn't I run into the same problem? 

> 
> Vadim
> 
> 
> 
> >-Alex
> >
> >  
> >
> >>
> >>    
> >>
> >>>>>...
> >>>>>
> >>>>><a href="city-detail?city="$city"><xsl:value-of
> >>>>>select="$city"/></a>
> >>>>>
> >>>>>After transformation I get:
> >>>>><a
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
>
>>>href="city-detail?city=%D0%94%D0%B5%D0%BB%D0%B8">����</a>
> >>>      
> >>>
> >>>>   
> >>>>
> >>>>What's serializer configuration? Does it have
> >>>>        
> >>>>
> >>proper
> >>    
> >>
> >>>>encoding set?
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>I'm using the default, i.e., I haven't changed
> >>>anything since installation.
> >>>
> >>> 
> >>>
> >>>      
> >>>
> >>>>Vadim
> >>>>
> >>>>
> >>>>
> >>>>   
> >>>>
> >>>>        
> >>>>
> >>>>>--- Alex Romayev <ro...@yahoo.com> wrote:
> >>>>>
> >>>>>
> >>>>>     
> >>>>>
> >>>>>          
> >>>>>
> >>>>>>Hello,
> >>>>>>
> >>>>>>I'm having what seems to be an encoding
> problem
> >>>>>>            
> >>>>>>
> >>--
> >>    
> >>
> >>>>>>not
> >>>>>>sure it's related to Cocoon, but... ;)
> >>>>>>
> >>>>>><xsl:for-each select="//city-name">
> >>>>>><a
> >>>>>>            
> >>>>>>
> >>href="city-detail?city-name={.}"><xsl:value-of
> >>    
> >>
> >>>>>>select="."/></a><br/>
> >>>>>></xsl:for-each>
> >>>>>>
> >>>>>>All my xml is UTF-8, it work in English, but
> not in
> >>>>>>
> >>>>>>Russian.  Any ideas?
> >>>>>>
> >>>>>>Thanks,
> >>>>>>-Alex      
> >>>>>>            
> >>>>>>
> 
> 
> 
> 
>
---------------------------------------------------------------------
> 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: Encoding problem

Posted by Vadim Gritsenko <va...@verizon.net>.
Alex Romayev wrote:

>--- Vadim Gritsenko <va...@verizon.net>
>wrote:
>  
>
>>Alex Romayev wrote:
>>
>>    
>>
>>>--- Vadim Gritsenko <va...@verizon.net>
>>>wrote:
>>> 
>>>
>>>      
>>>
>>>>Alex Romayev wrote:
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Let me be more specific and also simplify the
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>example:
>>>>   
>>>>
>>>>...
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>Does not work:
>>>>>
>>>>><xsl:param name="city" select="'Äåëè'"/>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>Are these funny characters above in UTF-8? Does
>>>>        
>>>>
>>your
>>    
>>
>>>>XSL has 
>>>>encoding="UTF-8" on the top?
>>>>   
>>>>
>>>>        
>>>>
>>>Yes.  Also, note that this only happens to the href
>>>attribute, the value of the <a> element comes out
>>>correctly.
>>>
>>>      
>>>
>>Then what do you want? It works correctly. See 
>>http://www.w3.org/Addressing/rfc1738.txt
>>
>>Vadim
>>    
>>
>
>Good point, I may have a problem in another stylesheet
>(part of the pipeline that responds to the url in
>question):
>
>This parameter is set by the href:
><xsl:param name="city"/>
>
>This should match and does it correctly when 'Delhi'
>is passed, but does not match when I pass 'Äåëè':
>
><xsl:apply-templates select="//city[name=$city]/>
>

Check what encoding is used to decode URL. It should be container 
encoding, but you need UTF-8.

PS In any case, non US-ASCII symbols in URL is not a good idea.

Vadim



>-Alex
>
>  
>
>>
>>    
>>
>>>>>...
>>>>>
>>>>><a href="city-detail?city="$city"><xsl:value-of
>>>>>select="$city"/></a>
>>>>>
>>>>>After transformation I get:
>>>>><a
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>href="city-detail?city=%D0%94%D0%B5%D0%BB%D0%B8">Äåëè</a>
>>>      
>>>
>>>>   
>>>>
>>>>What's serializer configuration? Does it have
>>>>        
>>>>
>>proper
>>    
>>
>>>>encoding set?
>>>>   
>>>>
>>>>        
>>>>
>>>I'm using the default, i.e., I haven't changed
>>>anything since installation.
>>>
>>> 
>>>
>>>      
>>>
>>>>Vadim
>>>>
>>>>
>>>>
>>>>   
>>>>
>>>>        
>>>>
>>>>>--- Alex Romayev <ro...@yahoo.com> wrote:
>>>>>
>>>>>
>>>>>     
>>>>>
>>>>>          
>>>>>
>>>>>>Hello,
>>>>>>
>>>>>>I'm having what seems to be an encoding problem
>>>>>>            
>>>>>>
>>--
>>    
>>
>>>>>>not
>>>>>>sure it's related to Cocoon, but... ;)
>>>>>>
>>>>>><xsl:for-each select="//city-name">
>>>>>><a
>>>>>>            
>>>>>>
>>href="city-detail?city-name={.}"><xsl:value-of
>>    
>>
>>>>>>select="."/></a><br/>
>>>>>></xsl:for-each>
>>>>>>
>>>>>>All my xml is UTF-8, it work in English, but not in
>>>>>>
>>>>>>Russian.  Any ideas?
>>>>>>
>>>>>>Thanks,
>>>>>>-Alex      
>>>>>>            
>>>>>>




---------------------------------------------------------------------
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: Encoding problem

Posted by Alex Romayev <ro...@yahoo.com>.
--- Vadim Gritsenko <va...@verizon.net>
wrote:
> Alex Romayev wrote:
> 
> >--- Vadim Gritsenko <va...@verizon.net>
> >wrote:
> >  
> >
> >>Alex Romayev wrote:
> >>
> >>    
> >>
> >>>Let me be more specific and also simplify the
> >>>      
> >>>
> >>example:
> >>    
> >>
> >>...
> >>
> >>    
> >>
> >>>Does not work:
> >>>
> >>><xsl:param name="city" select="'����'"/>
> >>>
> >>>      
> >>>
> >>Are these funny characters above in UTF-8? Does
> your
> >>XSL has 
> >>encoding="UTF-8" on the top?
> >>    
> >>
> >
> >Yes.  Also, note that this only happens to the href
> >attribute, the value of the <a> element comes out
> >correctly.
> >
> 
> Then what do you want? It works correctly. See 
> http://www.w3.org/Addressing/rfc1738.txt
> 
> Vadim

Good point, I may have a problem in another stylesheet
(part of the pipeline that responds to the url in
question):

This parameter is set by the href:
<xsl:param name="city"/>

This should match and does it correctly when 'Delhi'
is passed, but does not match when I pass '����':

<xsl:apply-templates select="//city[name=$city]/>

-Alex

> 
> 
> 
> >>>...
> >>>
> >>><a href="city-detail?city="$city"><xsl:value-of
> >>>select="$city"/></a>
> >>>
> >>>After transformation I get:
> >>><a
> >>>      
> >>>
>
>>href="city-detail?city=%D0%94%D0%B5%D0%BB%D0%B8">����</a>
> >>    
> >>
> >>What's serializer configuration? Does it have
> proper
> >>encoding set?
> >>    
> >>
> >
> >I'm using the default, i.e., I haven't changed
> >anything since installation.
> >
> >  
> >
> >>Vadim
> >>
> >>
> >>
> >>    
> >>
> >>>--- Alex Romayev <ro...@yahoo.com> wrote:
> >>> 
> >>>
> >>>      
> >>>
> >>>>Hello,
> >>>>
> >>>>I'm having what seems to be an encoding problem
> --
> >>>>not
> >>>>sure it's related to Cocoon, but... ;)
> >>>>
> >>>><xsl:for-each select="//city-name">
> >>>><a
> href="city-detail?city-name={.}"><xsl:value-of
> >>>>select="."/></a><br/>
> >>>></xsl:for-each>
> >>>>
> >>>>All my xml is UTF-8, it work in English, but not
> >>>>        
> >>>>
> >>in
> >>    
> >>
> >>>>Russian.  Any ideas?
> >>>>
> >>>>Thanks,
> >>>>-Alex
> >>>> 
> >>>>        
> >>>>
> 
> 
> 
>
---------------------------------------------------------------------
> 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: Encoding problem

Posted by Vadim Gritsenko <va...@verizon.net>.
Alex Romayev wrote:

>--- Vadim Gritsenko <va...@verizon.net>
>wrote:
>  
>
>>Alex Romayev wrote:
>>
>>    
>>
>>>Let me be more specific and also simplify the
>>>      
>>>
>>example:
>>    
>>
>>...
>>
>>    
>>
>>>Does not work:
>>>
>>><xsl:param name="city" select="'Äåëè'"/>
>>>
>>>      
>>>
>>Are these funny characters above in UTF-8? Does your
>>XSL has 
>>encoding="UTF-8" on the top?
>>    
>>
>
>Yes.  Also, note that this only happens to the href
>attribute, the value of the <a> element comes out
>correctly.
>

Then what do you want? It works correctly. See 
http://www.w3.org/Addressing/rfc1738.txt

Vadim



>>>...
>>>
>>><a href="city-detail="$city"><xsl:value-of
>>>select="$city"/></a>
>>>
>>>After transformation I get:
>>><a
>>>      
>>>
>>href="city-detail=%D0%94%D0%B5%D0%BB%D0%B8">Äåëè</a>
>>    
>>
>>What's serializer configuration? Does it have proper
>>encoding set?
>>    
>>
>
>I'm using the default, i.e., I haven't changed
>anything since installation.
>
>  
>
>>Vadim
>>
>>
>>
>>    
>>
>>>--- Alex Romayev <ro...@yahoo.com> wrote:
>>> 
>>>
>>>      
>>>
>>>>Hello,
>>>>
>>>>I'm having what seems to be an encoding problem --
>>>>not
>>>>sure it's related to Cocoon, but... ;)
>>>>
>>>><xsl:for-each select="//city-name">
>>>><a href="city-detail?city-name={.}"><xsl:value-of
>>>>select="."/></a><br/>
>>>></xsl:for-each>
>>>>
>>>>All my xml is UTF-8, it work in English, but not
>>>>        
>>>>
>>in
>>    
>>
>>>>Russian.  Any ideas?
>>>>
>>>>Thanks,
>>>>-Alex
>>>> 
>>>>        
>>>>



---------------------------------------------------------------------
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: Encoding problem

Posted by Alex Romayev <ro...@yahoo.com>.
--- Vadim Gritsenko <va...@verizon.net>
wrote:
> Alex Romayev wrote:
> 
> >Let me be more specific and also simplify the
> example:
> >
> ...
> 
> >Does not work:
> >
> ><xsl:param name="city" select="'����'"/>
> >
> 
> Are these funny characters above in UTF-8? Does your
> XSL has 
> encoding="UTF-8" on the top?

Yes.  Also, note that this only happens to the href
attribute, the value of the <a> element comes out
correctly.

> 
> 
> >...
> >
> ><a href="city-detail="$city"><xsl:value-of
> >select="$city"/></a>
> >
> >After transformation I get:
> ><a
>
>href="city-detail=%D0%94%D0%B5%D0%BB%D0%B8">����</a>
> >
> 
> What's serializer configuration? Does it have proper
> encoding set?

I'm using the default, i.e., I haven't changed
anything since installation.

> 
> Vadim
> 
> 
> 
> >--- Alex Romayev <ro...@yahoo.com> wrote:
> >  
> >
> >>Hello,
> >>
> >>I'm having what seems to be an encoding problem --
> >>not
> >>sure it's related to Cocoon, but... ;)
> >>
> >><xsl:for-each select="//city-name">
> >> <a href="city-detail?city-name={.}"><xsl:value-of
> >>select="."/></a><br/>
> >></xsl:for-each>
> >>
> >>All my xml is UTF-8, it work in English, but not
> in
> >>Russian.  Any ideas?
> >>
> >>Thanks,
> >>-Alex
> >>    
> >>
> 
> 
>
---------------------------------------------------------------------
> 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: Encoding problem

Posted by Vadim Gritsenko <va...@verizon.net>.
Alex Romayev wrote:

>Let me be more specific and also simplify the example:
>
...

>Does not work:
>
><xsl:param name="city" select="'Äåëè'"/>
>

Are these funny characters above in UTF-8? Does your XSL has 
encoding="UTF-8" on the top?


>...
>
><a href="city-detail="$city"><xsl:value-of
>select="$city"/></a>
>
>After transformation I get:
><a
>href="city-detail=%D0%94%D0%B5%D0%BB%D0%B8">Äåëè</a>
>

What's serializer configuration? Does it have proper encoding set?

Vadim



>--- Alex Romayev <ro...@yahoo.com> wrote:
>  
>
>>Hello,
>>
>>I'm having what seems to be an encoding problem --
>>not
>>sure it's related to Cocoon, but... ;)
>>
>><xsl:for-each select="//city-name">
>> <a href="city-detail?city-name={.}"><xsl:value-of
>>select="."/></a><br/>
>></xsl:for-each>
>>
>>All my xml is UTF-8, it work in English, but not in
>>Russian.  Any ideas?
>>
>>Thanks,
>>-Alex
>>    
>>


---------------------------------------------------------------------
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: Encoding problem

Posted by Alex Romayev <ro...@yahoo.com>.
--- Barbara Post <ba...@ifrance.com> wrote:
> maybe :
> <a href="city-detail="{$city}"><xsl:value-of
> select="$city"/></a>

Sorry, just a typo in my e-mail, I did actually use
{$city}.

> 
> try to use Russian-compatible output encoding rather
> than utf-8 ?

The site is multi-lingual, so I have to use utf-8

> 
> ----- Original Message -----
> From: "Alex Romayev" <ro...@yahoo.com>
> To: <co...@xml.apache.org>
> Sent: Wednesday, September 18, 2002 12:53 PM
> Subject: Re: Encoding problem
> 
> 
> > Let me be more specific and also simplify the
> example:
> >
> > Works:
> >
> > <xsl:param name="city" select="'Delhi'"/>
> >
> > ...
> >
> > <a href="city-detail="$city"><xsl:value-of
> > select="$city"/></a>
> >
> > After transformation I get:
> > <a href="city-detail=Delhi">Delhi</a>
> >
> > Does not work:
> >
> > <xsl:param name="city" select="'����'"/>
> >
> > ...
> >
> > <a href="city-detail="$city"><xsl:value-of
> > select="$city"/></a>
> >
> > After transformation I get:
> > <a
> >
> href="city-detail=%D0%94%D0%B5%D0%BB%D0%B8">����</a>
> >
> >
> > --- Alex Romayev <ro...@yahoo.com> wrote:
> > > Hello,
> > >
> > > I'm having what seems to be an encoding problem
> --
> > > not
> > > sure it's related to Cocoon, but... ;)
> > >
> > > <xsl:for-each select="//city-name">
> > >  <a
> href="city-detail?city-name={.}"><xsl:value-of
> > > select="."/></a><br/>
> > > </xsl:for-each>
> > >
> > > All my xml is UTF-8, it work in English, but not
> in
> > > Russian.  Any ideas?
> > >
> > > Thanks,
> > > -Alex
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > 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>
> 


---------------------------------------------------------------------
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: Encoding problem

Posted by Barbara Post <ba...@ifrance.com>.
maybe :
<a href="city-detail="{$city}"><xsl:value-of
select="$city"/></a>

try to use Russian-compatible output encoding rather than utf-8 ?

----- Original Message -----
From: "Alex Romayev" <ro...@yahoo.com>
To: <co...@xml.apache.org>
Sent: Wednesday, September 18, 2002 12:53 PM
Subject: Re: Encoding problem


> Let me be more specific and also simplify the example:
>
> Works:
>
> <xsl:param name="city" select="'Delhi'"/>
>
> ...
>
> <a href="city-detail="$city"><xsl:value-of
> select="$city"/></a>
>
> After transformation I get:
> <a href="city-detail=Delhi">Delhi</a>
>
> Does not work:
>
> <xsl:param name="city" select="'Äåëè'"/>
>
> ...
>
> <a href="city-detail="$city"><xsl:value-of
> select="$city"/></a>
>
> After transformation I get:
> <a
> href="city-detail=%D0%94%D0%B5%D0%BB%D0%B8">Äåëè</a>
>
>
> --- Alex Romayev <ro...@yahoo.com> wrote:
> > Hello,
> >
> > I'm having what seems to be an encoding problem --
> > not
> > sure it's related to Cocoon, but... ;)
> >
> > <xsl:for-each select="//city-name">
> >  <a href="city-detail?city-name={.}"><xsl:value-of
> > select="."/></a><br/>
> > </xsl:for-each>
> >
> > All my xml is UTF-8, it work in English, but not in
> > Russian.  Any ideas?
> >
> > Thanks,
> > -Alex
> >
> >
> >
> ---------------------------------------------------------------------
> > 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: Encoding problem

Posted by Ivan Luzyanin <iv...@ProZa.Lviv.UA>.
On Wednesday 18 September 2002 13:53, Alex Romayev wrote:
> Let me be more specific and also simplify the example:
>
> Works:
>
> <xsl:param name="city" select="'Delhi'"/>
>
> ...
>
> <a href="city-detail="$city"><xsl:value-of
> select="$city"/></a>
>
> After transformation I get:
> <a href="city-detail=Delhi">Delhi</a>
>
> Does not work:
>
> <xsl:param name="city" select="'Äåëè'"/>
>
> ...
>
> <a href="city-detail="$city"><xsl:value-of
> select="$city"/></a>
>
> After transformation I get:
> <a
> href="city-detail=%D0%94%D0%B5%D0%BB%D0%B8">Äåëè</a>
>
> --- Alex Romayev <ro...@yahoo.com> wrote:
> > Hello,
> >
> > I'm having what seems to be an encoding problem --
> > not
> > sure it's related to Cocoon, but... ;)
> >
> > <xsl:for-each select="//city-name">
> >  <a href="city-detail?city-name={.}"><xsl:value-of
> > select="."/></a><br/>
> > </xsl:for-each>
> >
> > All my xml is UTF-8, it work in English, but not in
> > Russian.  Any ideas?
> >
> > Thanks,
> > -Alex

Try to use this configuration for you HTML serializer:

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

But maybe problem coused by your xslt's or xsp's (but i'm not sure), try to 
use <?xml version="1.0" encoding="UTF-8"?> for all your xml files.

Hope it helps.

Regards!
Ivan Luzyanin.

---------------------------------------------------------------------
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: Encoding problem

Posted by Alex Romayev <ro...@yahoo.com>.
Let me be more specific and also simplify the example:

Works:

<xsl:param name="city" select="'Delhi'"/>

...

<a href="city-detail="$city"><xsl:value-of
select="$city"/></a>

After transformation I get:
<a href="city-detail=Delhi">Delhi</a>

Does not work:

<xsl:param name="city" select="'����'"/>

...

<a href="city-detail="$city"><xsl:value-of
select="$city"/></a>

After transformation I get:
<a
href="city-detail=%D0%94%D0%B5%D0%BB%D0%B8">����</a>


--- Alex Romayev <ro...@yahoo.com> wrote:
> Hello,
> 
> I'm having what seems to be an encoding problem --
> not
> sure it's related to Cocoon, but... ;)
> 
> <xsl:for-each select="//city-name">
>  <a href="city-detail?city-name={.}"><xsl:value-of
> select="."/></a><br/>
> </xsl:for-each>
> 
> All my xml is UTF-8, it work in English, but not in
> Russian.  Any ideas?
> 
> Thanks,
> -Alex
> 
> 
>
---------------------------------------------------------------------
> 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>