manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1444505 - /manifoldcf/branches/CONNECTORS-633/framework/core/src/main/java/org/apache/manifoldcf/core/fuzzyml/TagParseState.java
Date Sun, 10 Feb 2013 08:27:25 GMT
Author: kwright
Date: Sun Feb 10 08:27:24 2013
New Revision: 1444505

URL: http://svn.apache.org/r1444505
Log:
Decode hex properly

Modified:
    manifoldcf/branches/CONNECTORS-633/framework/core/src/main/java/org/apache/manifoldcf/core/fuzzyml/TagParseState.java

Modified: manifoldcf/branches/CONNECTORS-633/framework/core/src/main/java/org/apache/manifoldcf/core/fuzzyml/TagParseState.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-633/framework/core/src/main/java/org/apache/manifoldcf/core/fuzzyml/TagParseState.java?rev=1444505&r1=1444504&r2=1444505&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-633/framework/core/src/main/java/org/apache/manifoldcf/core/fuzzyml/TagParseState.java
(original)
+++ manifoldcf/branches/CONNECTORS-633/framework/core/src/main/java/org/apache/manifoldcf/core/fuzzyml/TagParseState.java
Sun Feb 10 08:27:24 2013
@@ -1003,7 +1003,18 @@ public class TagParseState extends Singl
       // Treat as a decimal value
       try
       {
-        int value = Integer.parseInt(input.substring(1));
+        input = input.substring(1);
+        int value;
+        if (input.startsWith("x"))
+        {
+          // Hex
+          value = Integer.decode("0"+input);
+        }
+        else
+        {
+          // Decimal
+          value = Integer.parseInt(input);
+        }
         StringBuilder sb = new StringBuilder();
         sb.append((char)value);
         return sb.toString();



Mime
View raw message