I installed binutils onto Mac OSX (host, i686 little endian) for mingw32msvc (target, i386 little endian). windres writes resource id and name string (not integer) in big endian into COFF. I investigated a function wind_MultiByteToWideChar() in "winduni.c" . I changed an argument, iconv_open ("UTF-16", iconv_name); to iconv_open ("UTF-16LE", iconv_name); This fixed the problem. Regards.
Sorry, these are resource type and resource name (not ID). Regards.
Same with version 2.22 of binutils and FreeBSD6.
Created attachment 6441 [details] Patch against version 2.22
The bug is present in 2.21, 2.22, and 2.23 (HEAD)
CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2013-03-27 11:53:46 Modified files: binutils : ChangeLog winduni.c Log message: PR binutils/13409 * winduni.c (codepages[]): Use UTF-16LE. (wind_MultiByteToWideChar): Likewise. (wind_WideCharToMultiByte): Likewise. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.2006&r2=1.2007 http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/winduni.c.diff?cvsroot=src&r1=1.15&r2=1.16
Hi Yuji, Hi Phil, Thanks for the bug report. I have applied Phil's patch. heers Nick
Thanks, Nick.