diff options
Diffstat (limited to 'Build/source/texk/dvipng/dvipng-src/special.c')
-rw-r--r-- | Build/source/texk/dvipng/dvipng-src/special.c | 19 |
1 files changed, 19 insertions, 0 deletions
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); |