This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Patch/windres: Fix handling of hex-notation escape sequences in quoted strings
- From: Ian Lance Taylor <ian at airs dot com>
- To: Danny Smith <dannysmith at clear dot net dot nz>
- Cc: 'binutils' <binutils at sources dot redhat dot com>
- Date: 11 Oct 2005 14:57:37 -0700
- Subject: Re: Patch/windres: Fix handling of hex-notation escape sequences in quoted strings
- References: <000001c5ceab$46405d80$466d65da@anykey>
Danny Smith <dannysmith@clear.net.nz> writes:
> > > The following windres bug was reported to mingw.org by Tom Bonner
> > >
> > >
> > > The resource
> > > MENUITEM "\xd6ffnen", IDM_OPEN
> > > doesn't work as it should do, instead I have to use something like
> > > MENUITEM "\xd6" "ffnen", IDM_OPEN
> > > (The latter one isn't compatible with MSVC6).
> > > The problem seems to be the double-f, which is
> > > interpreted as belonging to the previous escape sequence.
> >
> > The goal is to implement whatever the MS tools do. The
> > current code permits an unlimited number of digits after the
> > \x, since that is what C does and that was my understanding
> > of what the MS tools did. But if they do not--if they only
> > take two characters after the \x--then this change is
> > approved. Please do confirm that that is what MS does, though.
> >
>
> The testcase addition escapex-2.rc does confirm that MS rc (at least rc
> version 5.1.2264.1) only takes the first 2 chars after \x.
> Also that rc treats this as empty string,
> 101 DIALOG DISCARDABLE 0, 0, 186, 95
> BEGIN
> LTEXT "\x00ABC",-1,23,46,28,8
> END
>
>
> However, MS rc also supports wide chars
> and use the first 4 hex digits after \x (MS wchar_t is unsigned
> short) in this case
> LTEXT L"\x00ABC",-1,23,46,28,8
>
> windres does not support wide strings in controls, yet.
I don't understand the difference between these two examples.
Ian