diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2013-12-04 01:58:49 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2013-12-04 01:58:49 +0000 |
commit | ce2ea261acf1ac1fcff301f97ebb968f58a64a55 (patch) | |
tree | ae8c9c3769e2d7ace1d340a31291ad0cfbca6a6c /Build | |
parent | 719a9e9a590bc355560176568cfaac1f10fb9a97 (diff) |
Allow KANJI output file name in XeTeX on Windows
git-svn-id: svn://tug.org/texlive/trunk@32314 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/dvipdfm-x/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/dvipdfmx.c | 13 | ||||
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfobj.c | 4 |
3 files changed, 22 insertions, 0 deletions
diff --git a/Build/source/texk/dvipdfm-x/ChangeLog b/Build/source/texk/dvipdfm-x/ChangeLog index 41401ea6fa9..a58c165436d 100644 --- a/Build/source/texk/dvipdfm-x/ChangeLog +++ b/Build/source/texk/dvipdfm-x/ChangeLog @@ -1,3 +1,8 @@ +2013-12-04 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * dvipdfmx.c, pdfobj.c: Allow KANJI output file name in XeTeX + on Windows. + 2013-11-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp> * xbb.c: Add suffixes ".ai", ".AI" for the Illustrator files. diff --git a/Build/source/texk/dvipdfm-x/dvipdfmx.c b/Build/source/texk/dvipdfm-x/dvipdfmx.c index 4f65a49a8b6..56c24ad1877 100644 --- a/Build/source/texk/dvipdfm-x/dvipdfmx.c +++ b/Build/source/texk/dvipdfm-x/dvipdfmx.c @@ -961,6 +961,19 @@ main (int argc, char *argv[]) MESG("%s -> %s\n", dvi_filename ? dvi_filename : "stdin", pdf_filename ? pdf_filename : "stdout"); +#if defined(WIN32) + if (is_xetex) { + if (!dvi_filename && pdf_filename) { + char *enc = kpse_var_value ("command_line_encoding"); + if (enc && !(strncmp(enc,"utf8",5) && strncmp(enc,"utf-8",6))) { + file_system_codepage = CP_UTF8; + is_cp932_system = 0; + free (enc); + } + } + } +#endif + pdf_enc_compute_id_string(dvi_filename, pdf_filename); if (do_encryption) { if (key_bits > 40 && pdf_get_version() < 4) diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index e3a12722760..feb05ac84f4 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -323,7 +323,11 @@ pdf_out_init (const char *filename, int do_encryption) #endif pdf_output_file = stdout; } else { +#if defined(WIN32) + pdf_output_file = fsyscp_xfopen(filename, FOPEN_WBIN_MODE); +#else pdf_output_file = MFOPEN(filename, FOPEN_WBIN_MODE); +#endif if (!pdf_output_file) { if (strlen(filename) < 128) ERROR("Unable to open \"%s\".", filename); |