diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-05-14 10:38:44 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-05-14 10:38:44 +0000 |
commit | d35cf756b847737935051a244ec656c69203f6e6 (patch) | |
tree | cd7081ab92553b740e10bb070e1544fd29f7a91a /Build/source/texk/dvipdfm-x/pdfparse.c | |
parent | c86e229aa1b93590106820e1c52995ea9856c353 (diff) |
Allow image file names including 0x5c for (e)-pTeX in CP932-like system (Windows only).
git-svn-id: svn://tug.org/texlive/trunk@47709 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfparse.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfparse.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfparse.c b/Build/source/texk/dvipdfm-x/pdfparse.c index 050eb988230..73587e96f5e 100644 --- a/Build/source/texk/dvipdfm-x/pdfparse.c +++ b/Build/source/texk/dvipdfm-x/pdfparse.c @@ -503,6 +503,13 @@ parse_pdf_literal_string (const char **pp, const char *endptr) while (p < endptr) { +#ifdef _WIN32 + int check_kanji; + if (p > *pp && (IS_KANJI(p-1))) + check_kanji = 1; + else + check_kanji = 0; +#endif ch = p[0]; if (ch == ')' && op_count < 1) @@ -532,10 +539,22 @@ parse_pdf_literal_string (const char **pp, const char *endptr) switch (ch) { case '\\': +#ifdef _WIN32 + if (check_kanji == 0) { + ch = ps_getescc(&p, endptr); + if (ch >= 0) + sbuf[len++] = (ch & 0xff); + } else { + sbuf[len++] = ch; + p++; + } + break; +#else ch = ps_getescc(&p, endptr); if (ch >= 0) sbuf[len++] = (ch & 0xff); break; +#endif /* _WIN32 */ case '\r': p++; if (p < endptr && p[0] == '\n') |