Bug 692355 - Title bar has garbage characters (CJK or notdef boxes) on Win 7
Summary: Title bar has garbage characters (CJK or notdef boxes) on Win 7
Status: RESOLVED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: MS Windows Display Driver (show other bugs)
Version: master
Hardware: PC Windows 7
: P1 blocker
Assignee: Robin Watts
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-19 16:34 UTC by Ray Johnston
Modified: 2011-07-21 20:58 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
gs_text_title.png (10.93 KB, image/png)
2011-07-19 16:34 UTC, Ray Johnston
Details
0001.patch (5.53 KB, application/octet-stream)
2011-07-21 15:55 UTC, Robin Watts
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ray Johnston 2011-07-19 16:34:15 UTC
Created attachment 7688 [details]
gs_text_title.png

The UTF-8 changes seem to have introduced a problem that only shows up on
Windows 7. Chris reports that it is OK with Vista, and it works for all of
us that have XP (even running Ghostscript in an XP box under Win 7 Pro's
Virtual PC mode).

Something that may help -- the title bar on the "Ghostscript Image" window
is OK even when the text box window is garbled on my Windows 7 machine.

Isn't Microsoft so wonderfully consistent ? Something as basic as a title
bar works differently from the same binary on different version OS !
Comment 1 Robin Watts 2011-07-21 15:55:07 UTC
Created attachment 7697 [details]
0001.patch

Patch to fix this.

  git am 0001.patch

to apply. This tests out on my windows XP Pro 32bit box. I will commit when I have test reports for Windows 7.
Comment 2 Robin Watts 2011-07-21 20:43:21 UTC
Chris confirms this works, so committed as:

commit 554ce829a9eb59da437541e2efbc646d9edc2805
Author: Robin Watts <Robin.Watts@artifex.com>
Date:   Thu Jul 21 16:40:21 2011 +0100

    Fix Bug 692355; gswin32 has garbage chars in window title bars.

    Existing ghostscript includes windows.h without defining UNICODE, but
    calls the unicode versions of functions where appropriate. Here we
    move to defining UNICODE before including windows.h, but we keep to
    the practise of calling A or W specific variants as much as possible.

    Partly this is because of time before the release, but mostly a fear
    that this might lead to a Pandoras box of changes.
Comment 3 Ray Johnston 2011-07-21 20:58:06 UTC
I also have confirmed this fix on Windows 7 64-bit.