This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]