From cf208721fc9aab946840c8e05ee20cf75bd75cbd Mon Sep 17 00:00:00 2001 From: angryziber Date: Thu, 4 Jan 2007 13:39:03 +0000 Subject: [PATCH] Encoding is set back to ISO-8859-1, because using Readers for PropertyResourceBundle is supported only in Java 1.6. Pretty Unicode characters don't look correctly on Windows in UI components. git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk@110 375186e5-ef17-0410-b0b6-91563547dcda --- ipscan/resources/Labels.txt | 6 +++--- ipscan/src/net/azib/ipscan/config/ComponentRegistry.java | 1 + ipscan/src/net/azib/ipscan/config/Labels.java | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ipscan/resources/Labels.txt b/ipscan/resources/Labels.txt index 7e6adf63..06964d7f 100755 --- a/ipscan/resources/Labels.txt +++ b/ipscan/resources/Labels.txt @@ -90,7 +90,7 @@ text.gettingStarted2=Main terminology:\n\nFeeder - generator of IP addresses for button.OK=OK button.cancel=Cancel button.close=Close -button.next=Next → +button.next=Next -> button.start=Start button.start.img=images/buttons/start.png button.stop=Stop @@ -105,8 +105,8 @@ button.delete=De&lete button.save=&Save button.insert=&Insert button.add=&Add -button.left=⇦ -button.right=⇨ +button.left=<< +button.right=>> combobox.feeder.tooltip=IP Feeder selection. Change this if you need another source for IP addresses to scan list.unknown.img=images/list/unknown.png list.dead.img=images/list/dead.png diff --git a/ipscan/src/net/azib/ipscan/config/ComponentRegistry.java b/ipscan/src/net/azib/ipscan/config/ComponentRegistry.java index ddfa30a3..b70feff5 100755 --- a/ipscan/src/net/azib/ipscan/config/ComponentRegistry.java +++ b/ipscan/src/net/azib/ipscan/config/ComponentRegistry.java @@ -71,6 +71,7 @@ public class ComponentRegistry { container.registerComponentInstance(Config.getDimensionsConfig()); container.registerComponentInstance(Config.getOpenersConfig()); container.registerComponentInstance(Config.getFavoritesConfig()); + container.registerComponentInstance(Labels.getInstance()); container.registerComponentImplementation(ExporterRegistry.class); container.registerComponentImplementation(TXTExporter.class); diff --git a/ipscan/src/net/azib/ipscan/config/Labels.java b/ipscan/src/net/azib/ipscan/config/Labels.java index ad2025f4..5b4b7033 100755 --- a/ipscan/src/net/azib/ipscan/config/Labels.java +++ b/ipscan/src/net/azib/ipscan/config/Labels.java @@ -5,7 +5,6 @@ package net.azib.ipscan.config; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; import java.util.Locale; import java.util.MissingResourceException; import java.util.PropertyResourceBundle; @@ -65,7 +64,8 @@ public final class Labels { throw new MissingResourceException("Labels not found!", Labels.class.getName(), "Labels"); } try { - instance.labels = new PropertyResourceBundle(new InputStreamReader(labelsStream, "UTF-8")); + // TODO: support UTF-8 here (unfortunately, stock PropertyResourceBundle supports Readers only starting with 1.6) + instance.labels = new PropertyResourceBundle(labelsStream); } catch (IOException e) { throw new MissingResourceException(e.toString(), Labels.class.getName(), "Labels");