Use of the L prefix for wide strings in resource files

Paul Vriens paul.vriens.wine at gmail.com
Sun Dec 5 12:08:42 CST 2010


On 12/05/2010 04:14 PM, Alexandre Julliard wrote:
> Paul Vriens<paul.vriens.wine at gmail.com>  writes:
>
>> Hi,
>>
>> Yaron just made me aware of something he and I discussed briefly a few
>> weeks ago.
>>
>> The shlwapi resource files uses the following:
>>
>>   PUSHBUTTON L"&OK", IDOK, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
>>   PUSHBUTTON L"&Cancel", IDCANCEL, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
>>   PUSHBUTTON L"&Yes", IDYES, 105, 40, 50, 14, WS_GROUP | WS_TABSTOP
>>   PUSHBUTTON L"&No", IDNO, 160, 40, 50, 14, WS_GROUP | WS_TABSTOP
>>
>> There doesn't seem to be an issue with most of the languages as our
>> resource compiler seem to do things just right.
>>
>> I did however see strangeness for some languages and also the not yet
>> submitted Hebrew translation (maybe more?):
>>
>> http://source.winehq.org/transl/resource.php?branch=master&lang=011%3A01&resfile=dlls%2Fshlwapi&type=5&id=4608
>> http://source.winehq.org/transl/resource.php?branch=master&lang=022%3A01&resfile=dlls%2Fshlwapi&type=5&id=4608
>>
>> ResHacker shows the same strangeness so it appears not only to be the
>> translation site.
>>
>> Any idea where to start looking?
>
> L"" strings are simply expanded from 8-bit to 16-bit, so it's only
> suitable for strings encoded in Latin-1. In fact the parser should
> probably reject anything that doesn't fit in 7-bit ASCII.
>

So we can have a patch that removes those L"" strings and one to change 
the behavior of the parser?

I guess we can get safely rid of all L"" strings instead of just the 
ones that show the issue.

-- 
Cheers,

Paul.



More information about the wine-devel mailing list