cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32838] New: - [PATCH] Portal PageLabels can't handle non-ascii labelname
Date Fri, 24 Dec 2004 17:43:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32838>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

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

           Summary: [PATCH] Portal PageLabels can't handle non-ascii
                    labelname
           Product: Cocoon 2
           Version: Current SVN 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: blocks
        AssignedTo: Ralph.Goers@dslextreme.com
        ReportedBy: Ralph.Goers@dslextreme.com
                CC: dev@cocoon.apache.org


Opened on behalf of Roy Huang.

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:&#20844;&#21578;&#26639;&#65288;Simplified Chinese&#65289;&#65292;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.

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") .

and in line 91-92 buffer.append(requestParameterName).append('=')
                        .append(SourceUtil.encode(key.toString()));

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

Mime
View raw message