From 94c2e367c3690be2a3c715b4577c81200652ad81 Mon Sep 17 00:00:00 2001
From: Norbert Preining <norbert@preining.info>
Date: Tue, 24 Sep 2019 03:00:39 +0000
Subject: CTAN sync 201909240300

---
 macros/luatex/latex/plantuml/plantuml.sty | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

(limited to 'macros/luatex/latex/plantuml/plantuml.sty')

diff --git a/macros/luatex/latex/plantuml/plantuml.sty b/macros/luatex/latex/plantuml/plantuml.sty
index d6777ed44e..d2958792bc 100644
--- a/macros/luatex/latex/plantuml/plantuml.sty
+++ b/macros/luatex/latex/plantuml/plantuml.sty
@@ -24,6 +24,11 @@
 
 \RequirePackage{adjustbox}
 
+% \jobname has a probrem of encodeing
+% if your latex filename include multibyte string
+% you need to redefine PlantUMLJobname to fix
+\def\PlantUMLJobname{\jobname}
+
 \ExplSyntaxOn
 \keys_define:nn { plantuml } {
   output .choices:nn = {
@@ -68,12 +73,12 @@
     }
   \fi
   \NewDocumentEnvironment{plantuml}{}{%
-    \VerbatimOut{\jobname-plantuml.txt}}
+    \VerbatimOut{\PlantUMLJobname-plantuml.txt}}
   {%
     \endVerbatimOut
     \ifluatex
       \directlua{
-        local jobname=\luastring{\jobname}
+        local jobname=\luastring{\PlantUMLJobname}
         local plantUmlMode=\luastring{\PlantUmlMode}
         require("plantuml.lua")
         convertPlantUmlToTikz(jobname, plantUmlMode)
@@ -85,10 +90,10 @@
     \fi
     \ifthenelse{\equal{\PlantUmlMode}{latex}}{
       \begin{adjustbox}{max width=\linewidth}
-        \input{\jobname-plantuml.latex}
+        \input{\PlantUMLJobname-plantuml.latex}
       \end{adjustbox}
     }{
-      \includegraphics[width=\maxwidth{\textwidth}]{\jobname-plantuml.\PlantUmlMode}
+      \includegraphics[width=\maxwidth{\textwidth}]{\PlantUMLJobname-plantuml.\PlantUmlMode}
     }
   }
 \or
-- 
cgit v1.2.3

