Re: [AD] dmc unicode patch

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 7/21/07, Peter Wang <novalazy@xxxxxxxxxx> wrote:
Can I get a patch to this effect?  Then I think I can release 4.2.2
tomorrow, unless you want to resolve the OSX universal binaries first?

I made the changes, and then MinGW32 broke. The problem was that under
SYSTEM_NONE the file encoding doesn't get set to Unicode. So the
various _w* functions are sent non-unicode strings and they fail.
(Before it didn't matter because the unicode functions were never
called under console mode.) I can do the following to fix that:

static int sys_none_init(void)
{
#if defined(ALLEGRO_WINDOWS)
	if (_al_win_unicode_paths()) {
	  set_file_encoding(U_UNICODE);
	}
#endif
	return 0;
}

But what about other UNIX and OS X? I see there is a
_unix_guess_file_encoding() that a few of the ports call. Are they
never called under system none?

--
Matthew Leverton




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/