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 12:08:17 +1300
- Subject: RE: Patch/windres: Fix handling of hex-notation escape sequences inquoted strings
> From: Ian Lance Taylor
> Sent: Wednesday, October 12, 2005 10:58 AM
>
> Danny Smith <dannysmith@clear.net.nz> writes:
>
> >
> > 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.
>
MS rc interprets the string in this control,
101 DIALOG DISCARDABLE 0, 0, 186, 95
BEGIN
LTEXT "\x00ABC",-1,23,46,28,8
END
as "\x00" "ABC" so the string is effectively empty
and the *wide* string in this control
102 DIALOG DISCARDABLE 0, 0, 186, 95
BEGIN
LTEXT L"\x00ABC",-1,23,46,28,8
END
as the concatenation of L"\x00AB" L"C" or «C
windres says syntax error with L
Danny
> Ian
>