From 9b2b57aab41337005912a0003e5c8700556bc607 Mon Sep 17 00:00:00 2001 From: wjoe Date: Tue, 24 Sep 2013 14:08:56 +0100 Subject: Replace \u encoded characters with the correct characters --- blasearch.java | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) mode change 100644 => 100755 blasearch.java diff --git a/blasearch.java b/blasearch.java old mode 100644 new mode 100755 index a5af42c..6ca2295 --- a/blasearch.java +++ b/blasearch.java @@ -32,6 +32,8 @@ public class blasearch { { String query = ""; + String version = "v1.2.1"; + /* Build query from query or arguments, depending on whether arguments were given. */ if (args.length == 0) { @@ -48,7 +50,10 @@ public class blasearch { query += args[i]; } } - + if (query.equals("-v") || query.equals("--version")) { + System.out.println(version); + System.exit(0); + } // Change all ' ' to '+' query = query.replaceAll(" ", "+"); @@ -73,11 +78,20 @@ public class blasearch { for(int i=0; i 1) { + for (int j = 1; j < searchParts.length; j++) { + int hexVal = Integer.parseInt(searchParts[j].substring(0,4),16); + searchResult += (char)hexVal; + searchResult += searchParts[j].substring(4); + } + } + results.add(searchResult); } } -- cgit v1.2.3