diff options
author | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-05-12 21:30:35 +0000 |
---|---|---|
committer | Takuji Tanaka <KXD02663@nifty.ne.jp> | 2014-05-12 21:30:35 +0000 |
commit | a041d0f601d8ee41ab12b5b8feb891577b12d86f (patch) | |
tree | 0a4c961d25881a0744bac9028dd0c73ff1c8c9b8 /Build/source/texk/mendexk | |
parent | d20a3bbbd9a030176e2074bdeea0277cd84b28d2 (diff) |
mendexk: Copy one byte if illegal lead byte in UTF-8
git-svn-id: svn://tug.org/texlive/trunk@33998 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/mendexk')
-rw-r--r-- | Build/source/texk/mendexk/ChangeLog | 2 | ||||
-rw-r--r-- | Build/source/texk/mendexk/fread.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Build/source/texk/mendexk/ChangeLog b/Build/source/texk/mendexk/ChangeLog index c3686a0c785..3f36acc692c 100644 --- a/Build/source/texk/mendexk/ChangeLog +++ b/Build/source/texk/mendexk/ChangeLog @@ -1,4 +1,4 @@ -2014-05-12 TANAKA Takuji <KXD02663@nifty.ne.jp> +2014-05-13 TANAKA Takuji <KXD02663@nifty.ne.jp> * fread.c: Add copy_multibyte_char() to copy multibyte character correctly. diff --git a/Build/source/texk/mendexk/fread.c b/Build/source/texk/mendexk/fread.c index 8edb29d5720..56dd8419ce5 100644 --- a/Build/source/texk/mendexk/fread.c +++ b/Build/source/texk/mendexk/fread.c @@ -447,8 +447,7 @@ static void copy_multibyte_char(char *buff1, char *buff2, int *i, int *j) len = multibytelen((unsigned char)buff1[*i]); if (len<0) { verb_printf(efp,"\nWarning: Illegal input of lead byte 0x%x in UTF-8.",(unsigned char)buff1[*i]); - (*i)++; - return; + len=1; /* copy one byte when illegal lead byte */ } while(len--) { if (j!=NULL) |