diff -rc lynx2-8-3.orig/src/LYCharUtils.c lynx2-8-3/src/LYCharUtils.c
*** lynx2-8-3.orig/src/LYCharUtils.c	Sat Apr  1 09:33:40 2000
--- lynx2-8-3/src/LYCharUtils.c	Fri Aug 25 13:43:56 2000
***************
*** 1685,1690 ****
--- 1685,1701 ----
      **	or if we are in CJK mode.
      */
      if (HTCJK != NOCJK) {
+ 	if (HTCJK == JAPANESE && cs_from != cs_to && stype == st_HTML) {
+ 	  CONST char *mime = LYCharSet_UC[cs_to].MIMEname;
+ 	  char *tmp = (char *)malloc(strlen(*str)+1);
+ 	  if (!tmp) outofmem(__FILE__, "LYUCFullyTranslateString");
+ 	  if (!strcmp(mime, "euc-jp")) {
+ 	      TO_EUC((CONST unsigned char *)*str, (unsigned char *)tmp);
+ 	  } else if (!strcmp(mime, "x-sjis") || !strcmp(mime, "shift_jis")) {
+ 	      TO_SJIS((CONST unsigned char *)*str, (unsigned char *)tmp);
+ 	  }
+ 	  StrAllocCopy(*str, tmp); FREE(tmp);
+ 	}
  	no_bytetrans = TRUE;
      } else if (cs_to <= 0 && cs_from == cs_to && (!Back || cs_to < 0)) {
  	no_bytetrans = TRUE;
diff -rc lynx2-8-3.orig/src/LYMainLoop.c lynx2-8-3/src/LYMainLoop.c
*** lynx2-8-3.orig/src/LYMainLoop.c	Thu Apr 20 10:57:56 2000
--- lynx2-8-3/src/LYMainLoop.c	Fri Aug 25 16:42:22 2000
***************
*** 7435,7441 ****
  	}
  	if (!cp)
  	    cp = curlink.lname;
! 	status_link(cp, more, is_www_index);
      } else if (is_www_index && more) {
  	char buf[128];
  
--- 7435,7456 ----
  	}
  	if (!cp)
  	    cp = curlink.lname;
! 	if (HTCJK != NOCJK) {
! 	    int i,len=strlen(cp);
! 	    char *s, *s0 = malloc(len+1);
! 	    for(s=s0,i=0; i<len; i++) {
! 		if ((*s = cp[i]) == '%') {
! 		    char m[3]; m[0]=cp[i+1]; m[1]=cp[i+2]; m[2]=0;
! 		    *s = strtol(m, NULL, 16); i+=2; 
! 		}
! 		s++;
! 	    }
! 	    *s = '\0';
! 	    status_link(s0, more, is_www_index);
! 	    free(s0);
! 	} else {
! 	    status_link(cp, more, is_www_index);
! 	}
      } else if (is_www_index && more) {
  	char buf[128];
  
diff -rc lynx2-8-3.orig/src/LYStrings.c lynx2-8-3/src/LYStrings.c
*** lynx2-8-3.orig/src/LYStrings.c	Mon Apr 17 19:59:17 2000
--- lynx2-8-3/src/LYStrings.c	Fri Aug 25 20:54:00 2000
***************
*** 19,24 ****
--- 19,31 ----
  #include <LYMainLoop.h>
  #endif
  
+ #ifndef SLANG_JVERSION
+ #define SLANG_JVERSION 700
+ #endif
+ #ifdef SLANG_JVERSION
+ #include <slkanji.h>
+ #endif
+ 
  #ifdef DJGPP_KEYHANDLER
  #include <pc.h>
  #include <keys.h>
***************
*** 1421,1457 ****
  PUBLIC int LYgetch_for ARGS1(
  	int,	code)
  {
     SLang_Key_Type *key;
     int keysym;
     current_sl_modifier = 0;
  
!    key = SLang_do_key (Keymap_List, myGetChar);
!    if ((key == NULL) || (key->type != SLKEY_F_KEYSYM))
!      return (current_sl_modifier ? 0 : DO_NOTHING);
! 
!    keysym = key->f.keysym;
! 
  #if defined (USE_MOUSE)
!    if (keysym == MOUSE_KEYSYM)
!      return sl_read_mouse_event (code);
  #endif
  
!    if (keysym < 0)
!        return 0;
! 
!    if (keysym & (LKC_ISLECLAC|LKC_ISLAC))
!        return (keysym);
  
!    current_sl_modifier = 0;
!    if (LKC_HAS_ESC_MOD(keysym)) {
!        current_sl_modifier = LKC_MOD2;
!        keysym &= LKC_MASK;
     }
! 
!    if (keysym+1 >= KEYMAP_SIZE)
!      return 0;
! 
!    return (keysym|current_sl_modifier);
  }
  
  /************************************************************************/
--- 1428,1483 ----
  PUBLIC int LYgetch_for ARGS1(
  	int,	code)
  {
+ #ifdef SLANG_JVERSION
+    static unsigned int kanji1 = 0;
+ #endif
     SLang_Key_Type *key;
     int keysym;
     current_sl_modifier = 0;
  
! #ifdef SLANG_JVERSION
!    if (!kanji1) {
! #endif
!        key = SLang_do_key (Keymap_List, myGetChar);
!        if ((key == NULL) || (key->type != SLKEY_F_KEYSYM))
! 	   return (current_sl_modifier ? 0 : DO_NOTHING);
!        keysym = key->f.keysym;
! #ifdef SLANG_JVERSION
!        if (iskanji(keysym)) {
! 	   /* kanji 1st byte */
! 	   kanji1 = SLang_Last_Key_Char;
! 	   return((SLang_Last_Key_Char & 0xff00) >> 8);
!        } else {
! #endif
  #if defined (USE_MOUSE)
! 	   if (keysym == MOUSE_KEYSYM)
! 	       return sl_read_mouse_event (code);
  #endif
+ 	   if (keysym < 0)
+ 	       return 0;
  
! 	   if (keysym & (LKC_ISLECLAC|LKC_ISLAC))
! 	       return (keysym);
  
! 	   current_sl_modifier = 0;
! 	   if (LKC_HAS_ESC_MOD(keysym)) {
! 	       current_sl_modifier = LKC_MOD2;
! 	       keysym &= LKC_MASK;
! 	   }
! 	   
! 	   if (keysym+1 >= KEYMAP_SIZE)
! 	       return 0;
! 	   
! 	   return (keysym|current_sl_modifier);
! #ifdef SLANG_JVERSION
!        }
!    } else {			
!        /* kanji 2nd byte */
!        unsigned int c = kanji1 & 0x00ff;
!        kanji1 = 0;
!        return(c);
     }
! #endif
  }
  
  /************************************************************************/
