summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--blaconvert.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/blaconvert.java b/blaconvert.java
index da99216..092d7d4 100644
--- a/blaconvert.java
+++ b/blaconvert.java
@@ -21,7 +21,7 @@
based on code by Jamie Walters <jagw@jagw.co.uk>
based on code by Joe Robinson <joe@lc8n.com>
- Version 1.32
+ Version 1.33
CHANGELOG
1.0 - First version
@@ -33,6 +33,7 @@
1.3 - Added support for currency symbols
1.31 - Trying to add euro (probably won't work)
1.32 - Changed currency to unicode
+ 1.33 - More euro fixing (maybe)
TODO
- Raw output option - result only with no spaces/commas/units
*/
@@ -52,7 +53,7 @@ public class blaconvert {
String sourceUnit = "";
String targetUnit = "";
String amount = "";
- String version = "1.32";
+ String version = "1.33";
/* Build query from query or arguments, depending on whether
arguments were given. */
@@ -125,11 +126,13 @@ public class blaconvert {
}
}
boolean currency = false;
- if(amount.startsWith("£") || amount.startsWith("$") || amount.startsWith("¥"))
+ if(amount.contains("\u00A3") || amount.contains("\u0024") || amount.contains("\u20AC") ||
+ amount.contains("\u00A5") || amount.contains("\u0080"))
{
amount.replaceAll("\u00A3","%A3");
amount.replaceAll("\u0024","%24");
- amount.replaceAll("\u20AC","%8010");
+ amount.replaceAll("\u20AC","%80");
+ amount.replaceAll("\u0080","%80");
amount.replaceAll("\u00A5","%A5");
currency = true;