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 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
> 


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