diff -uNr dia-0.84-0/app/Makefile.in dia-0.84-1/app/Makefile.in
--- dia-0.84-0/app/Makefile.in	Tue Feb 29 11:08:48 2000
+++ dia-0.84-1/app/Makefile.in	Tue Mar 21 02:23:03 2000
@@ -142,7 +142,7 @@
 PROGRAMS =  $(bin_PROGRAMS) $(noinst_PROGRAMS)
 
 
-DEFS = @DEFS@ -I. -I$(srcdir) -I..
+DEFS = @DEFS@ -I. -I$(srcdir) -I.. -DUSE_XIM
 LIBS = @LIBS@
 @HAVE_GNOME_PRINT_TRUE@dia_OBJECTS =  connectionpoint_ops.o diagram.o \
 @HAVE_GNOME_PRINT_TRUE@commands.o app_procs.o preferences.o load_save.o \
diff -uNr dia-0.84-0/app/disp_callbacks.c dia-0.84-1/app/disp_callbacks.c
--- dia-0.84-0/app/disp_callbacks.c	Sat Jan 29 13:52:38 2000
+++ dia-0.84-1/app/disp_callbacks.c	Tue Mar 21 02:23:04 2000
@@ -38,6 +38,63 @@
 /* This contains the point that was clicked to get this menu */
 static Point object_menu_clicked_point;
 
+#ifdef USE_XIM
+void create_input_dialog (DDisplay *ddisp) {
+  if (gdk_im_ready () && (ddisp->ic_attr = gdk_ic_attr_new ()) != NULL) {
+    gint width, height;
+    GdkColormap *colormap;
+    GdkEventMask mask;
+    GdkICAttr *attr = ddisp->ic_attr;
+    GdkICAttributesType attrmask = GDK_IC_ALL_REQ;
+    GdkIMStyle style;
+    GdkIMStyle supported_style = GDK_IM_PREEDIT_NONE | GDK_IM_PREEDIT_NOTHING |
+	                           GDK_IM_PREEDIT_POSITION | GDK_IM_STATUS_NONE |
+	                           GDK_IM_STATUS_NOTHING;
+    if(ddisp->canvas->style && ddisp->canvas->style->font->type != GDK_FONT_FONTSET)
+      supported_style &= ~GDK_IM_PREEDIT_POSITION;
+    attr->style = style = gdk_im_decide_style (supported_style);
+    attr->client_window = ddisp->canvas->window;
+    if((colormap = gtk_widget_get_colormap (ddisp->canvas)) != gtk_widget_get_default_colormap ()) {
+      attrmask |= GDK_IC_PREEDIT_COLORMAP;
+      attr->preedit_colormap = colormap;
+    }
+    switch (style & GDK_IM_PREEDIT_MASK) {
+    case GDK_IM_PREEDIT_POSITION:
+      if(ddisp->canvas->style && ddisp->canvas->style->font->type != GDK_FONT_FONTSET) {
+        g_warning ("¤«¤Ê´Á»úÊÑ´¹¤Î¥Õ¥©¥ó¥È¤¬¼èÆÀ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿¡£");
+        break;
+      }
+      attrmask |= GDK_IC_PREEDIT_POSITION_REQ;
+      gdk_window_get_size (ddisp->canvas->window, &width, &height);
+      attr->spot_location.x = 0;
+      attr->spot_location.y = 14;
+      attr->preedit_area.x = 0;
+      attr->preedit_area.y = 0;
+      attr->preedit_area.width = width;
+      attr->preedit_area.height = height;
+      attr->preedit_fontset = ddisp->canvas->style->font;
+      break;
+    }
+    ddisp->ic = gdk_ic_new (attr, attrmask);
+    if(ddisp->ic == NULL) g_warning ("¤«¤Ê´Á»úÊÑ´¹¤¬»ÈÍÑ¤Ç¤­¤Þ¤»¤ó¡ª");
+    else {
+      mask = gdk_window_get_events (ddisp->canvas->window);
+      mask |= gdk_ic_get_events(ddisp->ic);
+      gdk_window_set_events (ddisp->canvas->window, mask);
+      gdk_im_begin(ddisp->ic, ddisp->canvas->window);
+    }
+  }
+}
+
+void set_input_dialog(DDisplay *ddisp, int x, int y) {
+  if(ddisp->ic && (gdk_ic_get_style(ddisp->ic) & GDK_IM_PREEDIT_POSITION)) {
+    ddisp->ic_attr->spot_location.x = x;
+    ddisp->ic_attr->spot_location.y = y;
+    gdk_ic_set_attr (ddisp->ic, ddisp->ic_attr, GDK_IC_SPOT_LOCATION);
+  }
+}
+#endif
+
 static void
 object_menu_proxy(GtkWidget *widget, gpointer data)
 {
@@ -194,6 +251,7 @@
   int width, height;
   int new_size;
   int modified;
+  int x, y;
 
   return_val = FALSE;
  
@@ -232,8 +290,12 @@
 	ddisplay_update_scrollbars(ddisp);
       }
       break;
-
+    
     case GDK_FOCUS_CHANGE:
+#ifdef USE_XIM
+        if(ddisp->ic == NULL)
+          create_input_dialog (ddisp);
+#endif
       diagram_update_menu_sensitivity(ddisp->diagram);
       break;
       
@@ -333,8 +395,14 @@
 	obj = focus->obj;
 	if (diagram_is_selected(ddisp->diagram, obj)) {
 	  ObjectChange *obj_change = NULL;
-	
+
 	  object_add_updates(obj, ddisp->diagram);
+
+#ifdef USE_XIM
+          ddisplay_transform_coords(ddisp, obj->position.x, obj->position.y, &x, &y);
+          set_input_dialog(ddisp, x, y);
+#endif
+
 	  modified = (focus->key_event)(focus, kevent->keyval,
 					kevent->string, kevent->length,
 					&obj_change);
@@ -437,7 +505,6 @@
 
   /*printf("delete\n");*/
   ddisp = (DDisplay *)data;
-  
   ddisplay_close(ddisp);
   return TRUE;
 }
@@ -448,12 +515,18 @@
   DDisplay *ddisp;
   
   ddisp = (DDisplay *) data;
-
-  if (popup_shell == ddisp->shell) {
-    popup_shell = NULL;
+#ifdef USE_XIM
+  if (ddisp->ic != NULL) {
+      gdk_ic_destroy (ddisp->ic);
+      ddisp->ic = NULL;
   }
-
+  if (ddisp->ic_attr) {
+      gdk_ic_attr_destroy (ddisp->ic_attr);
+      ddisp->ic_attr = NULL;
+  }
+#endif
   ddisplay_really_destroy(ddisp);
+
 }
 
 
diff -uNr dia-0.84-0/app/display.c dia-0.84-1/app/display.c
--- dia-0.84-0/app/display.c	Sun Feb 27 16:36:40 2000
+++ dia-0.84-1/app/display.c	Tue Mar 21 02:23:04 2000
@@ -153,6 +153,11 @@
   g_hash_table_insert (display_ht, ddisp->shell, ddisp);
   g_hash_table_insert (display_ht, ddisp->canvas, ddisp);
 
+#ifdef USE_XIM
+  ddisp->ic = NULL;
+  ddisp->ic_attr = NULL;
+#endif
+
   return ddisp;  /*  set the user data  */
 }
 
diff -uNr dia-0.84-0/app/display.h dia-0.84-1/app/display.h
--- dia-0.84-0/app/display.h	Sat Jan 29 13:52:38 2000
+++ dia-0.84-1/app/display.h	Tue Mar 21 02:23:04 2000
@@ -64,6 +64,10 @@
   
   GSList *update_areas;           /* Update areas list                 */
   GSList *display_areas;          /* Display areas list                */
+#ifdef USE_XIM
+  GdkIC     *ic;
+  GdkICAttr *ic_attr;
+#endif
 };
 
 extern GdkCursor *default_cursor;
diff -uNr dia-0.84-0/app/render_eps.c dia-0.84-1/app/render_eps.c
--- dia-0.84-0/app/render_eps.c	Sun Feb 27 15:19:37 2000
+++ dia-0.84-1/app/render_eps.c	Tue Mar 21 02:23:04 2000
@@ -718,9 +718,13 @@
 static void
 set_font(RendererEPS *renderer, Font *font, real height)
 {
+  char *str;
 
-  fprintf(renderer->file, "/%s-latin1 ff %f scf sf\n",
-	  font_get_psfontname(font), (double)height);
+  str = font_get_psfontname(font);
+  if(strcmp(str, "Ryumin-Light") != 0)
+    fprintf(renderer->file, "/%s-latin1 ff %f scf sf\n", str, (double)height);
+  else
+    fprintf(renderer->file, "/%s-EUC-H ff %f scf sf\n", str, (double)height);
 }
 
 static void
diff -uNr dia-0.84-0/lib/font.c dia-0.84-1/lib/font.c
--- dia-0.84-0/lib/font.c	Mon Feb 28 08:29:21 2000
+++ dia-0.84-1/lib/font.c	Tue Mar 21 02:23:37 2000
@@ -86,6 +86,12 @@
 } FontData;
 
 FontData font_data[] = {
+  { "ÌÀÄ«",
+    "Ryumin-Light",
+    { "-misc-fixed-medium-r-normal-*-%d-*-*-*-*-*-jisx0208.1983-0",
+      NULL
+    }
+  }, 
   { "Times-Roman",
     "Times-Roman",
     { "-adobe-times-medium-r-normal-*-%d-*-*-*-*-*-*-*",
@@ -332,7 +338,7 @@
     buffer = (char *)g_malloc(bufsize);
     g_snprintf(buffer, bufsize, x11_font, 100);
     
-    gdk_font = gdk_font_load(buffer);
+    gdk_font = gdk_fontset_load(buffer);
     if (gdk_font!=NULL) {
       font->fontname_x11 = x11_font;
     }
@@ -349,7 +355,7 @@
       buffer = (char *)g_malloc(bufsize);
       g_snprintf(buffer, bufsize, x11_font, 100);
       
-      gdk_font = gdk_font_load(buffer);
+      gdk_font = gdk_fontset_load(buffer);
       g_free(buffer);
       if (gdk_font!=NULL) {
 	message_warning(_("Warning no X Font for %s found, \nusing %s instead.\n"), font->public.name, x11_font);
@@ -452,7 +458,7 @@
   bufsize = strlen(font->fontname_x11)+6;  /* Should be enought*/
   buffer = (char *)malloc(bufsize);
   g_snprintf(buffer, bufsize, font->fontname_x11, height);
-  gdk_font = gdk_font_load(buffer);
+  gdk_font = gdk_fontset_load(buffer);
   free(buffer);
 
   return gdk_font;
diff -uNr dia-0.84-0/lib/text.c dia-0.84-1/lib/text.c
--- dia-0.84-0/lib/text.c	Mon Nov 22 09:32:02 1999
+++ dia-0.84-1/lib/text.c	Tue Mar 21 02:23:04 2000
@@ -802,10 +802,13 @@
     break;
   default:
     if (strlen>0) {
+      int i;
       return_val = TRUE;
-      *change = text_create_change(text, TYPE_INSERT_CHAR, str[0],
-				   text->cursor_pos, text->cursor_row);
-      text_insert_char(text, str[0]);
+      for(i = 0;i < strlen;i++) {
+        *change = text_create_change(text, TYPE_INSERT_CHAR, str[i],
+				     text->cursor_pos, text->cursor_row);
+        text_insert_char(text, str[i]);
+      }
     }
     break;
   }  
