source: trunk/dports/textproc/nkf/files/nkf.git-6bbe38e718c98825229bce7ef9f8d236e63c095f.patch @ 97688

Last change on this file since 97688 was 97688, checked in by takanori@…, 7 years ago

nkf: version 2.1.3 (2012-08-29)

File size: 1.7 KB
  • nkf.c

    From: NARUSE, Yui <naruse@users.sourceforge.jp>
    Date: Wed, 29 Aug 2012 05:45:10 +0000 (+0900)
    Subject: Fix: Halfwidh treated as fullwidth on folding. [nkf-forum:65316]
    X-Git-Url: http://git.sourceforge.jp/view?p=nkf%2Fnkf.git;a=commitdiff_plain;h=6bbe38e718c98825229bce7ef9f8d236e63c095f
    
    Fix: Halfwidh treated as fullwidth on folding. [nkf-forum:65316]
    ---
    
    diff --git a/nkf.c b/nkf.c
    index ee855d8..4a6d758 100644
    a b fold_conv(nkf_char c2, nkf_char c1) 
    35003500        f_prev = c1;
    35013501        if (c2 || c2 == JIS_X_0201_1976_K)
    35023502            f_prev |= 0x80;  /* this is Japanese */
    3503         f_line += char_size(c2,c1);
     3503        f_line += c2 == JIS_X_0201_1976_K ? 1: char_size(c2,c1);
    35043504        if (f_line<=fold_len) {   /* normal case */
    35053505            fold_state = 1;
    35063506        } else {
  • nkf_test.pl

    diff --git a/nkf_test.pl b/nkf_test.pl
    index 9f85675..af607be 100644
    a b printf "%-40s", "[nkf-bug:21393]-X "; 
    10661066    "\xEF\xBD\xBC\xEF\xBE\x9E\xEF\xBD\xAC\xEF\xBD\xB0\xEF\xBE\x8F\xEF\xBE\x9D\xEF\xBD\xA5\xEF\xBE\x8E\xEF\xBE\x9F\xEF\xBE\x83\xEF\xBE\x84\xEF\xBD\xA1",
    10671067    "\x83W\x83\x83\x81[\x83}\x83\x93\x81E\x83|\x83e\x83g\x81B");
    10681068
     1069printf "%-40s",  "[nkf-forum:65316]  ";
     1070    &test("$nkf -xwW -f10",
     1071    "\xEF\xBD\xB1\xEF\xBD\xB2\xEF\xBD\xB3\xEF\xBD\xB4\xEF\xBD\xB5\xEF\xBD\xB6\xEF\xBD\xB7\xEF\xBD\xB8\xEF\xBD\xB9\xEF\xBD\xBA\xEF\xBD\xBB\xEF\xBD\xBC\xEF\xBD\xBD\xEF\xBD\xBE\xEF\xBD\xBF\xEF\xBE\x80\xEF\xBE\x81\xEF\xBE\x82\xEF\xBE\x83\xEF\xBE\x84",
     1072    "\xEF\xBD\xB1\xEF\xBD\xB2\xEF\xBD\xB3\xEF\xBD\xB4\xEF\xBD\xB5\xEF\xBD\xB6\xEF\xBD\xB7\xEF\xBD\xB8\xEF\xBD\xB9\xEF\xBD\xBA\n\xEF\xBD\xBB\xEF\xBD\xBC\xEF\xBD\xBD\xEF\xBD\xBE\xEF\xBD\xBF\xEF\xBE\x80\xEF\xBE\x81\xEF\xBE\x82\xEF\xBE\x83\xEF\xBE\x84\n");
     1073
    10691074    if (!NKF) {
    10701075printf "%-40s", "Guess NL";
    10711076&command_tests(
Note: See TracBrowser for help on using the repository browser.