From daa61875754bee45ee8a4f579571f4953b267aa2 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Wed, 5 Nov 2014 03:16:53 +0000 Subject: ptex2pdf 0.5 (5Nov) git-svn-id: svn://tug.org/texlive/trunk@35515 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/ptex2pdf/README | 2 +- Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Master/texmf-dist/doc/latex/ptex2pdf/README b/Master/texmf-dist/doc/latex/ptex2pdf/README index 5b6d10169a5..4ccacd30eca 100644 --- a/Master/texmf-dist/doc/latex/ptex2pdf/README +++ b/Master/texmf-dist/doc/latex/ptex2pdf/README @@ -91,7 +91,7 @@ Copyright and License Originally based on musixtex.lua from Bob Tennent. (c) Copyright 2012 Bob Tennent rdt@cs.queensu.ca -(c) Copyright 2013 Norbert Preining norbert@preining.info +(c) Copyright 2013-2014 Norbert Preining norbert@preining.info This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the diff --git a/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua b/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua index 46e42fa9cf8..2b1d361a8c6 100755 --- a/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua +++ b/Master/texmf-dist/scripts/ptex2pdf/ptex2pdf.lua @@ -1,7 +1,7 @@ #!/usr/bin/env texlua NAME = "ptex2pdf[.lua]" -VERSION = "0.4" +VERSION = "0.5" AUTHOR = "Norbert Preining " SHORTDESC = NAME .. ": Convert Japanese TeX documents to pdf" LONGDESC = [[ @@ -28,7 +28,7 @@ LICENSECOPYRIGHT = [[ Originally based on musixtex.lua from Bob Tennent. (c) Copyright 2012 Bob Tennent rdt@cs.queensu.ca -(c) Copyright 2013 Norbert Preining norbert@preining.info +(c) Copyright 2013-2014 Norbert Preining norbert@preining.info This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -122,6 +122,9 @@ CHANGELOG = [[ version 0.4 2013-05-07 NP quote the filename with ", so that special chars do survive add an example for TeXworks for files with different kanji encoding + version 0.5 2014-11-05 NP + on Windows: set command_line_encoding to utf8 when running uptex + (patch by Akira Kakuto) ]] @@ -252,6 +255,12 @@ if not io.open(filename .. ".tex", "r") then print("Non-existent file: ", filename .. ".tex") exit_code = 1 else + -- make sure that on Windows/uptex we are using utf8 as command line encoding + if use_uptex == 1 then + if os.type == 'windows' then + os.setenv('command_line_encoding', 'utf8') + end + end print("Processing ".. filename .. ".tex.") if (os.execute(tex .. " " .. texopts .. " \"" .. filename .. "\"") == 0) and (dvipdf == "" or (os.execute(dvipdf .. " " .. dvipdfopts .. " \"" .. filename .. "\"") == 0)) -- cgit v1.2.3