summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-01-06 10:17:52 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-01-06 10:17:52 +0000
commit40ff88d03a151e97c04d0e8bc4b9f5f73de8ec92 (patch)
tree9b323007060459d9e6defd6055664ea42cda33b5 /Build
parentd3d2a83a4438547867ef6bf72d748fdf1cf58e0c (diff)
dvipng-1.17
git-svn-id: svn://tug.org/texlive/trunk@53338 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipng/ChangeLog1
-rw-r--r--Build/source/texk/dvipng/TLpatches/ChangeLog2
-rw-r--r--Build/source/texk/dvipng/TLpatches/patch-08-win3228
-rw-r--r--Build/source/texk/dvipng/dvipng-src/special.c19
4 files changed, 50 insertions, 0 deletions
diff --git a/Build/source/texk/dvipng/ChangeLog b/Build/source/texk/dvipng/ChangeLog
index 9a334bbb25a..2608b80abee 100644
--- a/Build/source/texk/dvipng/ChangeLog
+++ b/Build/source/texk/dvipng/ChangeLog
@@ -1,5 +1,6 @@
2020-01-06 Akira Kakuto <kakuto@w32tex.org>
+ * version.ac (dvipng_version): 1.17.
* Import dvipng 1.17.
2019-04-07 Karl Berry <karl@freefriends.org>
diff --git a/Build/source/texk/dvipng/TLpatches/ChangeLog b/Build/source/texk/dvipng/TLpatches/ChangeLog
index cfcd3888816..33072606fa8 100644
--- a/Build/source/texk/dvipng/TLpatches/ChangeLog
+++ b/Build/source/texk/dvipng/TLpatches/ChangeLog
@@ -1,6 +1,8 @@
2020-01-06 Akira Kakuto <kakuto@w32tex.org>
Import dvipng-1.17.
+ * patch-08-win32: add to support non-ascii image file names
+ on Windows (Windows only).
2019-04-07 Karl Berry <karl@freefriends.org>
diff --git a/Build/source/texk/dvipng/TLpatches/patch-08-win32 b/Build/source/texk/dvipng/TLpatches/patch-08-win32
new file mode 100644
index 00000000000..eb820419d79
--- /dev/null
+++ b/Build/source/texk/dvipng/TLpatches/patch-08-win32
@@ -0,0 +1,28 @@
+--- special.c.orig Fri Aug 31 16:39:04 2018
++++ special.c Mon Jan 06 18:53:34 2020
+@@ -492,6 +492,25 @@
+
+ PSCodeInit(&image, NULL);
+ image.filename=kpse_find_file(psname,kpse_pict_format,0);
++#if !defined(MIKTEX) && defined(WIN32)
++ if (image.filename == NULL) {
++ wchar_t *wnam;
++ char *tmpnam;
++ int tmpcp;
++ tmpcp = file_system_codepage;
++ file_system_codepage = CP_UTF8;
++ tmpnam = kpse_find_file(psname,kpse_pict_format,0);
++ if (tmpnam) {
++ wnam = get_wstring_from_mbstring(CP_UTF8, tmpnam, wnam=NULL);
++ if (wnam) {
++ image.filename = get_mbstring_from_wstring(tmpcp, wnam, image.filename=NULL);
++ free(wnam);
++ }
++ free(tmpnam);
++ }
++ file_system_codepage = tmpcp;
++ }
++#endif
+ if (MmapFile(image.filename,&(image.fmmap)) || image.fmmap.size==0) {
+ Warning("Image file %s unusable, image will be left blank",
+ image.filename);
diff --git a/Build/source/texk/dvipng/dvipng-src/special.c b/Build/source/texk/dvipng/dvipng-src/special.c
index 60d899faae2..544bbabd307 100644
--- a/Build/source/texk/dvipng/dvipng-src/special.c
+++ b/Build/source/texk/dvipng/dvipng-src/special.c
@@ -492,6 +492,25 @@ void SetSpecial(char *start, char *end, int32_t hh, int32_t vv)
PSCodeInit(&image, NULL);
image.filename=kpse_find_file(psname,kpse_pict_format,0);
+#if !defined(MIKTEX) && defined(WIN32)
+ if (image.filename == NULL) {
+ wchar_t *wnam;
+ char *tmpnam;
+ int tmpcp;
+ tmpcp = file_system_codepage;
+ file_system_codepage = CP_UTF8;
+ tmpnam = kpse_find_file(psname,kpse_pict_format,0);
+ if (tmpnam) {
+ wnam = get_wstring_from_mbstring(CP_UTF8, tmpnam, wnam=NULL);
+ if (wnam) {
+ image.filename = get_mbstring_from_wstring(tmpcp, wnam, image.filename=NULL);
+ free(wnam);
+ }
+ free(tmpnam);
+ }
+ file_system_codepage = tmpcp;
+ }
+#endif
if (MmapFile(image.filename,&(image.fmmap)) || image.fmmap.size==0) {
Warning("Image file %s unusable, image will be left blank",
image.filename);