Fixes related to encoding and fonts/colors.
diff --git a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/util/Encodings.java b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/util/Encodings.java
index 1e5dd7b..f897dbe 100644
--- a/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/util/Encodings.java
+++ b/com.google.eclipse.terminal.local/src/com/google/eclipse/terminal/local/util/Encodings.java
@@ -12,7 +12,7 @@
  * @author alruiz@google.com (Alex Ruiz)
  */
 public final class Encodings {
-  public static final String DEFAULT_ENCODING = "ISO-8859-1";
+  public static final String DEFAULT_ENCODING = "UTF-8";
 
   private Encodings() {}
 }
diff --git a/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100Emulator.java b/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100Emulator.java
index 73e795e..305f337 100644
--- a/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100Emulator.java
+++ b/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100Emulator.java
@@ -90,9 +90,6 @@
     } else {
       text = new VT100EmulatorBackend(data);
     }
-    Style style = Style.getStyle("BLACK", "WHITE");
-    text.setDefaultStyle(style);
-    text.setStyle(style);
   }
 
   /**
diff --git a/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java b/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
index c810f85..1374e83 100644
--- a/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
+++ b/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/emulator/VT100TerminalControl.java
@@ -356,11 +356,12 @@
 
   protected void sendChar(char chKey, boolean altKeyPressed) {
     try {
-      int byteToSend = chKey;
+      String text = Character.toString(chKey);
+      byte[] bytes = text.getBytes(getEncoding());
       OutputStream os = getOutputStream();
       if (os == null) {
         // Bug 207785: NPE when trying to send char while no longer connected
-        Logger.log("NOT sending '" + byteToSend + "' because no longer connected");
+        Logger.log("NOT sending '" + text + "' because no longer connected");
       } else {
         if (altKeyPressed) {
           // When the ALT key is pressed at the same time that a character is typed, translate it into an ESCAPE
@@ -370,12 +371,12 @@
           // inserting the '�' character.
           //
           // TODO: Make the ESCAPE-vs-highbit behavior user configurable.
-          Logger.log("sending ESC + '" + byteToSend + "'");
+          Logger.log("sending ESC + '" + text + "'");
           getOutputStream().write('\u001b');
-          getOutputStream().write(byteToSend);
+          getOutputStream().write(bytes);
         } else {
-          Logger.log("sending '" + byteToSend + "'");
-          getOutputStream().write(byteToSend);
+          Logger.log("sending '" + text + "'");
+          getOutputStream().write(bytes);
         }
         getOutputStream().flush();
       }
diff --git a/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/textcanvas/StyleMap.java b/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/textcanvas/StyleMap.java
index ae96f4a..03311f8 100644
--- a/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/textcanvas/StyleMap.java
+++ b/com.google.eclipse.tm.terminal/src/com/google/eclipse/tm/internal/terminal/textcanvas/StyleMap.java
@@ -30,19 +30,12 @@
 
   private static final String PREFIX = "org.eclipse.tm.internal.";
 
-  // TODO propagate the name of the font in the FontRegistry
-  private static final String DEFAULT_FONT_NAME = "terminal.views.view.font.definition";
-
-  private String fontName = DEFAULT_FONT_NAME;
-
   private final Map<StyleColor, Color> colorMapForeground = new HashMap<StyleColor, Color>();
   private final Map<StyleColor, Color> colorMapBackground = new HashMap<StyleColor, Color>();
   private final Map<StyleColor, Color> colorMapIntense = new HashMap<StyleColor, Color>();
 
   private Point charSize;
 
-  private final Style defaultStyle;
-
   private boolean invertColors;
   private boolean proportional;
 
@@ -51,11 +44,10 @@
   private Color background = getColor(new RGB(0, 0, 0));
   private Color foreground = getColor(new RGB(229, 229, 229));
 
-  private Font font = JFaceResources.getFontRegistry().get(fontName);
+  private Font font = JFaceResources.getFontRegistry().get("org.eclipse.jface.textfont");
 
   StyleMap() {
     initColors();
-    defaultStyle = Style.getStyle(StyleColor.getStyleColor(BLACK), StyleColor.getStyleColor(WHITE));
     updateFont();
   }
 
@@ -159,13 +151,6 @@
     return actualColor;
   }
 
-  private Style defaultIfNull(Style style) {
-    if (style == null) {
-      style = defaultStyle;
-    }
-    return style;
-  }
-
   public void setInvertedColors(boolean invert) {
     if (invert == invertColors) {
       return;
@@ -175,7 +160,9 @@
   }
 
   public Font getFont(Style style) {
-    style = defaultIfNull(style);
+    if (style == null) {
+      return font;
+    }
     FontData fontDatas[] = font.getFontData();
     FontData data = fontDatas[0];
     if (style.isBold()) {
@@ -202,16 +189,7 @@
   public void updateFont() {
     Display display = Display.getCurrent();
     GC gc = new GC(display);
-    if (JFaceResources.getFontRegistry().hasValueFor(DEFAULT_FONT_NAME)) {
-      fontName = DEFAULT_FONT_NAME;
-    } else if (JFaceResources.getFontRegistry().hasValueFor("REMOTE_COMMANDS_VIEW_FONT")) {
-      // try RSE Shell View Font
-      fontName = "REMOTE_COMMANDS_VIEW_FONT";
-    } else {
-      // fall back to "basic jface text font"
-      fontName = "org.eclipse.jface.textfont";
-    }
-    gc.setFont(getFont());
+    gc.setFont(font);
     charSize = gc.textExtent("W");
     proportional = false;
     for (char c = ' '; c <= '~'; c++) {
@@ -230,14 +208,6 @@
     for (int i = 0; i < offsets.length; i++) {
       offsets[i] = (charSize.x - offsets[i]) / 2;
     }
-    if (!proportional) {
-      // Measure font in boldface, too, and if wider then treat like proportional.
-      gc.setFont(getFont(defaultStyle.setBold(true)));
-      Point charSizeBold = gc.textExtent("W");
-      if (charSize.x != charSizeBold.x) {
-        proportional = true;
-      }
-    }
     gc.dispose();
   }
 
@@ -290,5 +260,6 @@
 
   public void setFont(Font font) {
     this.font = font;
+    updateFont();
   }
 }