 retrieving revision 1.13
 diff -u -r1.13 TextUtilities.java
 --- src/free/util/TextUtilities.java	16 Mar 2008 01:17:00 -0000	1.13
-+++ src/free/util/TextUtilities.java	6 Jan 2011 04:16:43 -0000
-@@ -295,7 +295,9 @@
++++ src/free/util/TextUtilities.java	6 Jan 2011 07:15:13 -0000
+@@ -295,7 +295,8 @@
     */
    
    public static String getDefaultCharsetName(){
 -    return getDefaultCharset().name();
-+    System.out.println("default charset " + getDefaultCharset().name());
 +    //return getDefaultCharset().name();
 +    return "UTF-8"; // wtm
    }
    
    
-@@ -310,9 +312,12 @@
+@@ -310,9 +311,10 @@
    
    public static String convert(String s, String fromEncoding, String toEncoding)
        throws IllegalArgumentException{
 -    
      if ((fromEncoding == null) || (toEncoding == null))
        return s;
-+    System.out.println("Converting::: " + s + " from " + fromEncoding + " to " + toEncoding);
-+    //System.out.println("Im finſteren Jagdſchloß am offenen Felsquellwaſſer patzte der affig-flatterhafte kauzig-höfliche Bäcker über ſeinem verſifften kniffligen C-Xylophon.\n");
 +   //if (fromEncoding == toEncoding)
 +   //  return s;
      

-          pin.unread(b);
+
+        if (b > 0) {
+        if (((b == '\r') || (b == '\n')) && b != oldb) {
         
         // Ignore all-prompt lines
         if (lineStartsWithPrompt && (buf.length() == 0)){
@@ -497,9 +503,16 @@
         }
         else
           break;
+        }
+        else {
+          pin.unread(b);
+        }
+        }
+
       }
       
       buf.append((char)b);
+      //System.out.print(Integer.toHexString(b) + " ");
       
       // Filter out the prompt
       if (buf.toString().equals("fics% ")){
@@ -507,8 +520,16 @@
         lineStartsWithPrompt = true;
       }
     }
-    
-    return buf.toString();
+
+    //System.out.println("");
+    //System.out.println("utf8 ---got message " + TextUtilities.convert(line, "ISO-8859-1", "UTF-8"));
+    ///return buf.toString();
+
+    // Jin incorrectly converts single bytes into characters above.  To
+    // hack around this for UTF-8, which can represent characters
+    // with multiple bytes, we get back a stream of single bytes by
+    // pretending the badly-converted string is encoded as ISO-8859-1.
+    return TextUtilities.convert(buf.toString(), "ISO-8859-1", "UTF-8");
   }
   
   
@@ -523,6 +544,15 @@
     
     if (logStream != null)
       logStream.println(line);
+
+    // wtm
+    //System.out.println("got message " + line);
+    //System.out.println("utf8 ---got message " + TextUtilities.convert(line, "ISO-8859-1", "UTF-8"));
+    /*try {
+      System.out.println("now got message " + new String(line.getBytes("ISO-8859-1"), "UTF-8"));
+    } catch (UnsupportedEncodingException e) {
+    }*/
+    // System.out.println(" ♙♘♗♖♕♔ FatICS ♚♛♜♝♞♟");
     
     if (handleGameInfo(line))
       return;
Index: src/free/jin/console/AbstractConsoleDesignation.java
===================================================================
RCS file: /cvsroot/jin/jin/src/free/jin/console/AbstractConsoleDesignation.java,v
retrieving revision 1.18
diff -u -r1.18 AbstractConsoleDesignation.java
--- src/free/jin/console/AbstractConsoleDesignation.java	16 Mar 2008 01:18:02 -0000	1.18
+++ src/free/jin/console/AbstractConsoleDesignation.java	6 Jan 2011 04:16:38 -0000
@@ -339,6 +339,7 @@
   
   private String getActualEncoding(){

? build
? classes
? release/ant-contrib.jar
? release/compile
? release/jin-
? release/jin-fatics
Index: release/build.xml
===================================================================
RCS file: /cvsroot/jin/jin/release/build.xml,v
retrieving revision 1.63
diff -u -r1.63 build.xml
--- release/build.xml	24 Feb 2008 02:18:25 -0000	1.63
+++ release/build.xml	6 Jan 2011 07:14:49 -0000
@@ -26,7 +26,7 @@
 	<dirname property="app.dir" file="." /> <!-- The directory of the buildfile to run to build the app -->
 	<property name="releasefiles.dir" value="${app.dir}/build" /> <!-- The directory of the files to release -->
