RE: Good news on porting and question

Völker Ronny <[email protected]>
Newsgroups gmane.comp.java.scarab.devel
Message-ID <[email protected]>
Andrey Larionov wrote:
>Today i get first visible result during porting scarab to Turbine 2.4:
>Login form occurs on my screen :))) And Exceptions now renders by velocity.
>But trying to login produce new error. Turbine 2.4 uses trunk version of fulcrum-parser, but in trunk of scarab we uses patched older >version. Between this two version some (i'd like to say complete) incompatibility.
>As i remember patch for older version was provided by Ronny. If i'm wrong please correct me. I want to receive this patch to try adopt it to trunk.

Here is the patch.
But I thought, that bug was already fixed in the HEAD of the trunk.
Anyway, try it.

Ronny

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
fulcrum_parser.patch (application/octet-stream, 2.7 KB)
Index: parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java
===================================================================
--- parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java	(revision 223213)
+++ parser/src/java/org/apache/fulcrum/parser/DefaultParameterParser.java	(working copy)
@@ -219,12 +219,12 @@
             {
                 if (isNameTok)
                 {
-                    tmp = URLDecoder.decode(st.nextToken());
+                    tmp = URLDecoder.decode(st.nextToken(), getCharacterEncoding());
                     isNameTok = false;
                 }
                 else
                 {
-                    pathPart = URLDecoder.decode(st.nextToken());
+                    pathPart = URLDecoder.decode(st.nextToken(), getCharacterEncoding());
                     if (tmp.length() > 0)
                     {
                         add (convert(tmp), pathPart);
Index: parser/src/java/org/apache/fulcrum/parser/StringValueParser.java
===================================================================
--- parser/src/java/org/apache/fulcrum/parser/StringValueParser.java	(revision 223213)
+++ parser/src/java/org/apache/fulcrum/parser/StringValueParser.java	(working copy)
@@ -53,7 +53,7 @@
             String tok = st.nextToken();
             if ( urlDecode ) 
             {
-                tok = URLDecoder.decode(tok);
+                tok = URLDecoder.decode(tok, getCharacterEncoding());
             }
             
             if (isNameTok)
@@ -95,8 +95,8 @@
                 
                 if ( urlDecode ) 
                 {
-                    name = URLDecoder.decode(name);
-                    value = URLDecoder.decode(value);
+                    name = URLDecoder.decode(name, getCharacterEncoding());
+                    value = URLDecoder.decode(value, getCharacterEncoding());
                 }
             
                 if (name.length() > 0)
Index: project.properties
===================================================================
--- project.properties	(revision 223213)
+++ project.properties	(working copy)
@@ -9,8 +9,11 @@
 maven.checkstyle.format = turbine
 maven.checkstyle.properties = ${basedir}/project.properties
 maven.compile.deprecation = no
+maven.compile.target = 1.5
+maven.compile.source = 1.5
 
 
+
 # display the date on the site
 maven.xdoc.date = left
 
@@ -29,5 +32,5 @@
 maven.multiproject.navigation=aggregate
 maven.multiproject.aggregateDir=
 maven.multiproject.type=jar
-maven.multiproject.includes=**/project.xml
+maven.multiproject.includes=parser/project.xml
 maven.multiproject.excludes=proposals/**,target/**,project.xml
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.