X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.history%2Fsrc%2Forg%2Fsimantics%2Fhistory%2Fcsv%2FCSVFormatter.java;h=4e405e2acafff0ba2c81d06cb6a48d382a17d778;hp=6610d17f2456081d73031797f44599f43cf01ffb;hb=3d5ad70adb8c0276e6bc8a611addb885d17f3e22;hpb=c9e4e4e518dfae7f1e67df90f79c3f831b9cb82a diff --git a/bundles/org.simantics.history/src/org/simantics/history/csv/CSVFormatter.java b/bundles/org.simantics.history/src/org/simantics/history/csv/CSVFormatter.java index 6610d17f2..4e405e2ac 100644 --- a/bundles/org.simantics.history/src/org/simantics/history/csv/CSVFormatter.java +++ b/bundles/org.simantics.history/src/org/simantics/history/csv/CSVFormatter.java @@ -12,9 +12,7 @@ package org.simantics.history.csv; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.math.BigDecimal; -import java.net.URLDecoder; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.text.Format; @@ -85,20 +83,12 @@ public class CSVFormatter { i.history = history; i.label = label!=null?label:""; i.variableReference = variableReference!=null?variableReference:""; - i.variableReference = unescape(i.variableReference); + i.variableReference = URIs.safeUnescape(i.variableReference); i.historyItemId = historyItemId; i.unit = unit; if ( !items.contains(i) ) items.add( i ); } - private static String unescape(String url) { - try { - return URLDecoder.decode(url, "UTF-8"); - } catch (UnsupportedEncodingException e) { - return url; - } - } - /** * Sort items by variableId, label1, label2 */