You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by roy huang <li...@hotmail.com> on 2004/12/24 12:52:06 UTC

[Bug]PortalPageLabels can't handle non-ascii labelname

Hi all:
    With help of wiki http://wiki.apache.org/cocoon/PortalPageLabels, I change portal using label.It works fine until I use non-ASCII labelname ,the url generate by portal can't recognize by portal.
    For example:
    If label name is:公告栏(Simplified Chinese),url is:portal-page?pageLabel=%B9%AB%B8%E6%C0%B8,it won't work
    Because I'm using utf-8 encoding ,so I change url to portal-page?pageLabel=%E5%85%AC%E5%91%8A%E6%A0%8F,it works
    
    So the bug is obviously caused by url encoding.

    WDYT?

Roy Huang
    

Re: [Bug]PortalPageLabels can't handle non-ascii labelname

Posted by roy huang <li...@hotmail.com>.
Sorry,missing line 91-92 
                    buffer.append(requestParameterName).append('=')
                        .append(SourceUtil.encode(key.toString()));
Here should be modified too.

Roy Huang
----- Original Message ----- 
From: "roy huang" <li...@hotmail.com>
To: <de...@cocoon.apache.org>
Sent: Friday, December 24, 2004 8:17 PM
Subject: Re: [Bug]PortalPageLabels can't handle non-ascii labelname


> Hi all:
>     I checked the source code,in PageLabelLinkService.java(2.1.6) line 227:
>     uri.append(parmName).append('=').append(SourceUtil.encode(label));<--here
>     One solution is using SourceUtil.encode(label,"utf-8") .
> 
> Roy Huang
>  
> ----- Original Message ----- 
> From: "roy huang" <li...@hotmail.com>
> To: <de...@cocoon.apache.org>
> Sent: Friday, December 24, 2004 7:52 PM
> Subject: [Bug]PortalPageLabels can't handle non-ascii labelname
> 
> 
> > Hi all:
> >     With help of wiki http://wiki.apache.org/cocoon/PortalPageLabels, I change portal using label.It works fine until I use non-ASCII labelname ,the url generate by portal can't recognize by portal.
> >     For example:
> >     If label name is:公告栏(Simplified Chinese),url is:portal-page?pageLabel=%B9%AB%B8%E6%C0%B8,it won't work
> >     Because I'm using utf-8 encoding ,so I change url to portal-page?pageLabel=%E5%85%AC%E5%91%8A%E6%A0%8F,it works
> >     
> >     So the bug is obviously caused by url encoding.
> > 
> >     WDYT?
> > 
> > Roy Huang
> >     
> >

Re: [Bug]PortalPageLabels can't handle non-ascii labelname

Posted by roy huang <li...@hotmail.com>.
Hi all:
    I checked the source code,in PageLabelLinkService.java(2.1.6) line 227:
    uri.append(parmName).append('=').append(SourceUtil.encode(label));<--here
    One solution is using SourceUtil.encode(label,"utf-8") .

Roy Huang
 
----- Original Message ----- 
From: "roy huang" <li...@hotmail.com>
To: <de...@cocoon.apache.org>
Sent: Friday, December 24, 2004 7:52 PM
Subject: [Bug]PortalPageLabels can't handle non-ascii labelname


> Hi all:
>     With help of wiki http://wiki.apache.org/cocoon/PortalPageLabels, I change portal using label.It works fine until I use non-ASCII labelname ,the url generate by portal can't recognize by portal.
>     For example:
>     If label name is:公告栏(Simplified Chinese),url is:portal-page?pageLabel=%B9%AB%B8%E6%C0%B8,it won't work
>     Because I'm using utf-8 encoding ,so I change url to portal-page?pageLabel=%E5%85%AC%E5%91%8A%E6%A0%8F,it works
>     
>     So the bug is obviously caused by url encoding.
> 
>     WDYT?
> 
> Roy Huang
>     
> 

Re: [Bug]PortalPageLabels can't handle non-ascii labelname

Posted by Ralph Goers <Ra...@dslextreme.com>.
roy huang wrote:

>Hi all:
>    With help of wiki http://wiki.apache.org/cocoon/PortalPageLabels, I change portal using label.It works fine until I use non-ASCII labelname ,the url generate by portal can't recognize by portal.
>    For example:
>    If label name is:公告栏(Simplified Chinese),url is:portal-page?pageLabel=%B9%AB%B8%E6%C0%B8,it won't work
>    Because I'm using utf-8 encoding ,so I change url to portal-page?pageLabel=%E5%85%AC%E5%91%8A%E6%A0%8F,it works
>    
>    So the bug is obviously caused by url encoding.
>
>    WDYT?
>
>Roy Huang
>  
>
I opened a bug report on your behalf (bug 32838). You should register
with bugzilla and open them yourself so you can be notified of updates.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32838

As soon as I can test the code I will commit it. I will not be able to
test Chinese so once I do you will need to verify it.

Ralph