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;
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
*/