--- src/LYBookmark.c.orig	Wed Feb 17 23:29:33 1999
+++ src/LYBookmark.c	Mon Feb 22 14:57:59 1999
@@ -12,6 +12,7 @@
 #include <LYCharSets.h>  /* need for LYHaveCJKCharacterSet */
 #include <LYCurses.h>
 #include <GridText.h>
+#include <HTCJK.h>
 
 #ifdef VMS
 #include <nam.h>
@@ -37,6 +38,9 @@
     FREE(string_buffer);
 }
 
+extern HTkcode kanji_code;
+extern HTCJKlang HTCJK;
+
 /*
  *  Tries to open a bookmark file for reading, which may be
  *  the default, or based on offering the user a choice from
@@ -201,6 +205,7 @@
     char *bookmark_URL = NULL;
     char filename_buffer[LY_MAXPATH];
     char string_buffer[BUFSIZ];
+    char tmp_string_buffer[BUFSIZ];
     char *Address = NULL;
     char *Title = NULL;
     int i, c;
@@ -270,7 +275,21 @@
      *	Allow user to change the title. - FM
      */
     do {
-	LYstrncpy(string_buffer, title, sizeof(string_buffer)-1);
+	if (HTCJK == JAPANESE) {
+	    switch(kanji_code) {
+	    case EUC:
+		TO_EUC(title, tmp_string_buffer);
+		break;
+	    case SJIS:
+		TO_SJIS(title, tmp_string_buffer);
+		break;
+	    default:
+		break;
+	    }
+	    LYstrncpy(string_buffer, tmp_string_buffer, sizeof(string_buffer)-1);
+	} else {
+	    LYstrncpy(string_buffer, title, sizeof(string_buffer)-1);
+	}
 	convert_to_spaces(string_buffer, FALSE);
 	LYMBM_statusline(TITLE_PROMPT);
 	LYgetstr(string_buffer, VISIBLE, sizeof(string_buffer), NORECALL);
@@ -291,7 +310,12 @@
      *  from display character set which may need changing.
      *  Do NOT convert any 8-bit chars if we have CJK display. - LP
      */
-    StrAllocCopy(Title, string_buffer);
+    if (HTCJK == JAPANESE) {
+	TO_JIS(string_buffer, tmp_string_buffer);
+	StrAllocCopy(Title, tmp_string_buffer);
+    } else {
+	StrAllocCopy(Title, string_buffer);
+    }
     LYEntify(&Title, TRUE);
     if (UCSaveBookmarksInUnicode &&
 	have8bit(Title) && (!LYHaveCJKCharacterSet)) {
