hanterm-3.1.6 UTF-8 모드에서 ㅠ_ㅠ 쳐지나요

oedalpha의 이미지

MacOSX Panther에서 hanterm-3.1.6을 쓰고 있는데,

UTF-8 모드에서 ㅠ_ㅠ 가 ㅜ_ㅜ 로 쳐집니다. 혹시 저만 그런건지 궁금합니다.

한텀 쓰시는 분들 UTF-8 모드에서 ㅠ_ㅠ 한번 쳐봐주세요..

hanterm-3.1.6 소스를 좀 쳐다본 바로는 hanterm 쪽의 버그인 것 같긴 합니다만
mac에서 컴파일 하는 방법을 잘 몰라서, 더이상 테스트를 못해보고 있습니다.

./configure 할 때
configure: error: Unable to successfully link Athena library (-lcf_x_athena) with test program
이 에러 나는데.. 컴파일 하는 법 아시는 분들도 답변 부탁드립니다.
-----------------------------
이 아래는 소스에 관심있는 분들만 보세요..

hanterm에서 hangul.c 의 일부 발췌

/* 조합형 중성 -> 완성형 낱자 변환 */

static unsigned char johab_vow_to_wan[] = {
    0, 0,
    0xd4, 0xbf, 0xc0, 0xc1, 0xc2, 0xc3, /* (채움),ㅏ,ㅐ,ㅑ,ㅒ,ㅓ */
    0, 0,
    0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, /* ㅔ,ㅕ,ㅖ,ㅗ,ㅗㅏ,ㅗㅐ */
    0, 0,
    0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* ㅗㅣ,ㅛ,ㅜ,ㅜㅓ,ㅜㅔ,ㅜㅣ */
    0, 0,
    0xd0, 0xd1, 0xd2, 0xd3           /* ㅠ,ㅡ,ㅡㅣ,ㅣ */
};

static char jamo_index2[]= {            /* 0:fill 1:ㅏ, ... */
   0,  0,  0,  1,  2,  3,  4,  5,
   0,  0,  6,  7,  8,  9,  10, 11,
   0,  0, 12, 13, 14, 15,  16, 17,
   0,  0, 18, 19, 20, 21,   0,  0
};

/* 3 바이트로 된 조합형 -> UTF-8 */

int convert_3_to_utf8( f , m , l , buf )
    int f, m, l;
    unsigned char *buf;
{
    int index_f, index_m, index_l;
    unsigned long code = 0;

#if defined(DEBUG_PATCH_UTF8) /* by hanmaum 1998.2.5 */
    printf("convert_3_to_utf8(%02x,%02x,%02x)\n", f, m, l);
#endif

    if (f == 0xff) {
        code = convert_char_ksc5601_to_ucs2((unsigned char)m, (unsigned char)l);
    }
    else {
        index_f = jamo_index1[f];
        index_m = jamo_index2[m];
        index_l = jamo_index3[l];

        if (index_f > 0 && index_m > 0 && index_l >= 0) {
            code = 0xac00 + ((((index_f-1) * 21) + (index_m-1)) * 28) + index_l;
            /* 0xac00 <= code <= 0xd7a3 */
        }
        else if (index_f > 0 && index_m == 0 && index_l == 0) {
            code = 0x3100
                    | (johab_fcon_to_wan[index_f+1] - (unsigned char)0x70);
        }
        else if (index_f == 0 && index_m > 0 && index_l == 0) {
            code = 0x3100
                    | (johab_vow_to_wan[index_m+2] - (unsigned char)0x70);
        }
        else if (index_f > 0 && index_m == 0 && index_l == 0) {
            code = 0x3100
                    | (johab_lcon_to_wan[index_l+1] - (unsigned char)0x70);
        }
    }

마지막 convert_3_to_utf8 함수에서 index_m 에서 ㅓ랑 ㅔ 사이가 두칸 벌어지는데,
johab_vow_to_wan 에서 또 한번 두칸 벌어지게 됩니다.. 결과적으로 네칸이 벌어지고, ㅠ와 ㅜ가 네칸 차이지요.. 이 부분 때문에 문제가 있는게 아닐까 하고 생각합니다.
Prentice의 이미지

데비안의 hanterm-classic 3.1.6.0-3에서도 그러네요.

oedalpha의 이미지

cvs에서 최신 버전을 받아서 컴파일하니까 제대로 되네요..
2년, 한달 전에 wkpark님이 고치신 듯 합니다..
정식 릴리즈 버전은 2002년 1월 판이라서 고치신 게 반영이 안되었나봅니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.