This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: windres RC codepage
- From: "Aaron W. LaFramboise" <aaron98wiridge9 at aaronwl dot com>
- To: Vlada Macek <tuttle at bbs dot fsik dot cvut dot cz>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 19 Nov 2004 03:05:05 -0600
- Subject: Re: windres RC codepage
- References: <418F6B4E.2000509@bbs.cvut.cz> <418FAA7C.5000301@aaronwl.com> <4194C319.6060102@bbs.cvut.cz>
Vlada Macek wrote:
> Each of his two results (2.13.90 and 2.15.91) is different, but none is
> ok, no UCS-2 as I expect.
Well, apparently windres does some sort of codepage conversion when
compiling RC input. It isn't trivially obvious to me why this is, so
I'll need to investigate further.
This behavior is equivilent to Microsoft's RC, so windres is doing the
right thing. However, Microsoft's RC has a /c option to set that
codepage to Czech, or whatever, and so fix this problem. Unfortunately,
windres does not have a similar option.
> What should be the best solution?
Ideally, someone would add a similar option to windres. It probably
would not be difficult to add, but I can't say for sure yet.
I don't understand at all what sort of transformation of encodings is
being done. If I use windres to compile your Czech input file (with
whatever encoding is default for US English WinXP), then decompile it
back to a RC file, the text I start with is not the same text I finish
with. This seems very odd:
Actual Czech string: PÅÃliÅ ÅluÅouÄkà kÅÅ ÄÃbelskà Ãdy PÅÃLIÅ ÅLUÅOUÄKÃ
KÅÅ ÃPÄL ÄÃBELSKÃ ÃDY
String in my native codepage: PÃÃliÅ ÅluÂouÃkà kÃà ÃÃbelskà Ãdy PÃÃLIÅ
ÅLUÂOUÃKÃ KÃÃ ÃPÃL ÃÃBELSKÃ ÃDY
String after conversion: PÃÃli1 eluÂouÃkà kÃà ÃÃbelskà Ãdy PÃÃLI0
dLUÂOUÃKÃ KÃÃ ÃPÃL ÃÃBELSKÃ ÃDY
Anyway, I'm going to look at this a little more, and see why this
happens. In particular, I'm going to look at the sources, and look for
a description of the binary resource representation. If anyone else
knows more about the encoding of resources strings, speak up! :)
Aaron W. LaFramboise