summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/pdftoepdf.cc')
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
index 4db0c90a639..747c6838c00 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -166,6 +166,15 @@ static XRef *xref = 0;
static PdfDocument *find_add_document(char *file_name)
{
PdfDocument *p = pdfDocuments;
+#ifdef _WIN32
+ wchar_t *fnamew;
+ if (file_system_codepage == CP_UTF8 && win32_codepage != CP_UTF8) {
+ fnamew = get_wstring_from_mbstring(CP_UTF8, file_name, fnamew=NULL);
+ xfree(file_name);
+ file_name = get_mbstring_from_wstring(win32_codepage, fnamew, file_name=NULL);
+ xfree(fnamew);
+ }
+#endif
while (p && strcmp(p->file_name, file_name) != 0)
p = p->next;
if (p) {