summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/synctexdir
diff options
context:
space:
mode:
authorHironobu Yamashita <h.y.acetaminophen@gmail.com>2022-01-22 17:03:22 +0000
committerHironobu Yamashita <h.y.acetaminophen@gmail.com>2022-01-22 17:03:22 +0000
commit76e833603f3eb350549d8b472d5b0c1ebae21713 (patch)
tree0adce490f86927e7a81a2f05330b9590bf80663d /Build/source/texk/web2c/synctexdir
parent87e77a4b4b35459b0bc1aa06f48f2cf0db19ae9e (diff)
[e][u]ptex: Distinguish 8-bit characters and Japanese characters (H. Kitagawa et al.)
For better support of LaTeX3 (expl3). More details in TUGboat 41(2):329--334, 2020. git-svn-id: svn://tug.org/texlive/trunk@61692 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/synctexdir')
-rw-r--r--Build/source/texk/web2c/synctexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/synctexdir/synctex.c21
2 files changed, 25 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/synctexdir/ChangeLog b/Build/source/texk/web2c/synctexdir/ChangeLog
index c9b70a2bb0c..67f4da43e3c 100644
--- a/Build/source/texk/web2c/synctexdir/ChangeLog
+++ b/Build/source/texk/web2c/synctexdir/ChangeLog
@@ -1,3 +1,7 @@
+2022-01-22 Hironori Kitagawa <h_kitagawa2001@yahoo.co.jp>
+
+ * synctex.c: Reencode nameoffile to utf8 for pTeX.
+
2021-12-16 Luigi Scarso <luigi.scarso@gmail.com>
* synctex_main.c [WIN32]: #include <kpathsea/progname.h>
diff --git a/Build/source/texk/web2c/synctexdir/synctex.c b/Build/source/texk/web2c/synctexdir/synctex.c
index ae1334d61e2..4ec54a4494e 100644
--- a/Build/source/texk/web2c/synctexdir/synctex.c
+++ b/Build/source/texk/web2c/synctexdir/synctex.c
@@ -301,13 +301,34 @@ static int fsyscp_remove(char *name);
#endif /* pdfTeX ... */
#endif /* _WIN32 */
+#if defined(pTeX) || defined(upTeX) || defined(epTeX) || defined(eupTeX)
+#define IS_pTeX 1
+#else
+#define IS_pTeX 0
+#endif
+
/* This macro layer was added to take luatex into account as suggested by T. Hoekwater. */
+# if IS_pTeX && !defined(_WIN32)
+char *SYNCTEX_GET_JOB_NAME()
+{
+ char *tmp = gettexstring(jobname);
+ char *tmpa = ptenc_from_internal_enc_string_to_utf8(tmp);
+ if (tmpa) { SYNCTEX_FREE(tmp); return tmpa; } else return tmp;
+}
+char *SYNCTEX_GET_LOG_NAME()
+{
+ char *tmp = gettexstring(texmflogname);
+ char *tmpa = ptenc_from_internal_enc_string_to_utf8(tmp);
+ if (tmpa) { SYNCTEX_FREE(tmp); return tmpa; } else return tmp;
+}
+# else
# if !defined(SYNCTEX_GET_JOB_NAME)
# define SYNCTEX_GET_JOB_NAME() (gettexstring(jobname))
# endif
# if !defined(SYNCTEX_GET_LOG_NAME)
# define SYNCTEX_GET_LOG_NAME() (gettexstring(texmflogname))
# endif
+# endif
# if !defined(SYNCTEX_CURRENT_TAG)
# define SYNCTEX_CURRENT_TAG (curinput.synctextagfield)
# endif