Added encoding UTF-8 on Index getName().
--- a/src/jdict/AskWord.java Wed Jul 25 00:30:32 2007 +0200
+++ b/src/jdict/AskWord.java Wed Jul 25 00:39:59 2007 +0200
@@ -54,6 +54,10 @@
Vector results;
String toSearch = Replace.IksojAlCxapeloj(word.getString());
+ /* DEBUG */
+ StringItem tosearch = new StringItem("Serĉante:", toSearch);
+ myform.append(tosearch);
+
System.out.println("Serĉante: " + toSearch);
results = index.SearchDefinition(toSearch);
--- a/src/jdict/DictIndex.java Wed Jul 25 00:30:32 2007 +0200
+++ b/src/jdict/DictIndex.java Wed Jul 25 00:39:59 2007 +0200
@@ -46,7 +46,15 @@
if (i == 51 || i == 0)
return null;
- return new String(tmp, 0, i-1);
+ String result;
+ try {
+ result = new String(tmp, 0, i-1, "UTF-8");
+ } catch (UnsupportedEncodingException e)
+ {
+ System.out.println("Unsupported encoding.");
+ return null;
+ }
+ return result;
}
public int getLength()