summaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2014-05-12 16:22:52 +0200
committerTor Andersson <tor.andersson@artifex.com>2014-05-12 16:22:52 +0200
commit13307a97d019f63b58e8475f1320d5bf7000d82d (patch)
tree27447c0df7fd2523d985ab5aa1fa1d1ff68f98c5 /platform/x11
parent2557dc2dc33826d2f1dfae99d6a8d1443dfaed9a (diff)
downloadmupdf-13307a97d019f63b58e8475f1320d5bf7000d82d.tar.xz
Fix 695156: Display metadata with SetDlgItemTextW.
Convert from UTF-8 to UCS-2 to display unicode text properly.
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/win_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c
index 3804f671..50cc7285 100644
--- a/platform/x11/win_main.c
+++ b/platform/x11/win_main.c
@@ -442,6 +442,7 @@ INT CALLBACK
dloginfoproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
char buf[256];
+ wchar_t bufx[256];
fz_document *doc = gapp.doc;
switch(message)
@@ -488,7 +489,8 @@ dloginfoproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
*(char **)buf = STRING; \
if (fz_meta(doc, FZ_META_INFO, buf, 256) <= 0) \
buf[0] = 0; \
- SetDlgItemTextA(hwnd, ID, buf); \
+ MultiByteToWideChar(CP_UTF8, 0, buf, -1, bufx, nelem(bufx)); \
+ SetDlgItemTextW(hwnd, ID, bufx); \
}
SETUTF8(0x20, "Title");