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 inquoted strings
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: 'Ian Lance Taylor' <ian at airs dot com>
- Cc: 'binutils' <binutils at sources dot redhat dot com>
- Date: Wed, 12 Oct 2005 10:32:23 +1300
- Subject: RE: Patch/windres: Fix handling of hex-notation escape sequences inquoted strings
> From: Ian Lance Taylor
> Sent: Wednesday, October 12, 2005 6:59 AM
>
> Danny Smith 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.
Danny
> Ian