import java.io.File;
import java.io.IOException;
+import java.lang.reflect.Field;
+import java.nio.charset.Charset;
import java.util.LinkedList;
import java.util.List;
*/
public class Main {
public static final String APPLICATION_TITLE = "jVcard";
- public static final String APPLICATION_VERSION = "1.0-beta1-dev";
+ public static final String APPLICATION_VERSION = "1.0-beta2-dev";
static private Trans transService;
* @return the translation
*/
static public String trans(StringId id) {
-
if (transService == null)
return "";
}
}
+ if (UiColors.getInstance().isUnicode()) {
+ utf8();
+ }
+
if (files.size() == 0) {
if (filesTried) {
System.exit(1);
return files;
}
+ /**
+ * Really, really ask for UTF-8 encoding.
+ */
+ static private void utf8() {
+ try {
+ System.setProperty("file.encoding", "UTF-8");
+ Field charset = Charset.class.getDeclaredField("defaultCharset");
+ charset.setAccessible(true);
+ charset.set(null, null);
+ } catch (SecurityException | NoSuchFieldException
+ | IllegalArgumentException | IllegalAccessException e) {
+ }
+ }
+
static private void fullTestTable() throws IOException {
final Table<String> table = new Table<String>("Column 1", "Column 2",
"Column 3");