Mail Archives: cygwin/2010/04/30/08:57:27
We use cygwin's cpp.exe (gcc, I guess) to pre-process .rc files before they=
get converted into compiled resource files. In our source tree there's a =
file foo.rc, which is 8-bit ansi, which declares some stuff and then has th=
e following lines:
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif //_WIN32
#include "afxres.rc" // Standard components
#include "afxprint.rc" // printing/print preview resources
#endif
Those two #includes are files shipped with the Visual Studio Windows SDK.
Now this worked fine under Visual C 6/7/8/9. However, under VC10, suddenly=
those Microsoft include files are unicode. (Note: not an issue with unico=
de file names.. these have 8-bit file names and unicode contents). Now whe=
n the afxres.rc and afxprint.rc files are included, the contents are insert=
ed exactly as-is into the output stream, rather than interpreted. So the o=
utput file looks normal for a while, and then suddenly there's a bunch of b=
ox-char-box-char-etc with the (formerly unicode) contents of the afxres.rc =
file, then the same for afxprint.rc, and then some normal output again.
As a test, I changed foo.rc itself to be a unicode text file, and then its =
contents were similarly copied into the result file.
I found http://cygwin.com/cygwin-ug-net/setup-locale.html , but I'm not sur=
e that's my issue, really.
I don't know if this issue can be solved with a unicode code_page, or an up=
grade to a newer version of cygwin, or a command-line switch to the executa=
ble, or just I'm out of luck.
Can anyone shed some light on my problem? My apologies if this is the wron=
g mailing list for this question. Thank you.
Jason Davis
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -