Re: question : Korean char set

From: Kim Kyeong-Joong (neptune@goblins.yonsei.ac.kr)
Date: 12/09/96


Hmmm......
X-Mailer: ELM [version 2.4 PL24]
Content-Type: text
Content-Length: 2035      

> 
> Hi all,
> 
> I installed circle 3.0 on my SUN and I'm a Korean.
> I met a problem. I want to use Korean (language) in circle
> but I couldn't. The Korean code is 8bit. If a user type Korean,
> it's not passed to parser. How can I fix this problem.
> please help me.
> -- 
> Barry Jinhaeng Lee
> Programmer, System Admin, Web Master of Medison Co., Ltd.
> mailto:hilary@medison.co.kr  http://www.medison.co.kr/~hilary
> +-----------------------------------------------------------+
> | Ensure that you have read the CircleMUD Mailing List FAQ: |
> |   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
> +-----------------------------------------------------------+
> 

Korean characters or any other 8bit characters can be passed by
following modification.

1. find the following code in process_input() from comm.c

      } else if (isascii(*ptr) && isprint(*ptr)) {
        if ((*(write_point++) = *ptr) == '$') { /* copy one character */
          *(write_point++) = '$';       /* if it's a $, double it */
          space_left -= 2;
        } else
          space_left--;
      }
    }
-----------------------------------------------------------------------------
2. modify above code as follows.

      } else if ((isascii(*ptr) && isprint(*ptr)) ||
	((*ptr >= 0xa0) && (*ptr <= 0xfe) && (before != 0xff))) { /* KKJ */
        if ((*(write_point++) = *ptr) == '$') { /* copy one character */
          *(write_point++) = '$';       /* if it's a $, double it */
          space_left -= 2;
        } else
          space_left--;
      }
      before = *ptr;
    }

the variable named 'before' should be declared like this

        static unsigned char before = '\0';

3. modify all the isalpha() and isascii() function calls
to pass 8bit code.

	if (isalpha(ch))
------------------------------------------------------------
        if (isalpha(ch) || (ch >= 0xa0 && ch <= 0xfe))


Good Luck!

--
Kyeong Joong Kim
neptune@goblins.yonsei.ac.kr http://goblins.yonsei.ac.kr/~neptune
Goblin MUD : goblins.yonsei.ac.kr:4000

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST