I've finally figured out why arm-mingw32ce-windres doesn't handle
utf8-encoded .rc files correctly but don't know what to do about it.
It has to do with how autoconf works for binutils.

The problem is in wind_MultiByteToWideChar(), in
src/binutils/binutils/winduni.c.  That function has three
conditionally compilied sections coded:

#if defined (_WIN32) || defined (__CYGWIN__)
// use win32 API to convert utf-8 to utf-16
#elif defined (HAVE_ICONV_H)
// use iconv() to convert utf-8 to utf-16
#else
// do something stupid that only works for 7-bit ascii
#endif

I'm compiling cegcc on Debian, and it's the #else path that's being
used.  It's broken -- that is, it doesn't know what to do with utf8,
and instead of failing noisily it does the wrong thing silently.  The
fix would seem to be to get HAVE_ICONV_H defined by the configure
process, but I can't figure out how to do that.  configure.ac for
binutils doesn't reference iconv.h the way configure.ac does for gcc,
so there's no way for HAVE_ICONV_H to get defined.

I haven't checked whether the precompiled cegcc tarball on sourceforge
has the same problem (mishandled utf-8 .rc files) but suspect that it
does.  The problem seems to be that configuring binutils doesn't check
for iconv at all.

I'm new to autoconf.  Any suggestions on how to fix this?

Thanks,

--Eric
-- 
******************************************************************************
* From the desktop of: Eric House, xwo...@eehouse.org                        *
*       Crosswords 4.2 for MS Smartphone and PocketPC is OUT: xwords.sf.net  *
******************************************************************************

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to