Eric Blake wrote: > > if (sprintf (buf, "%ls", wstring) != -1) > > return 2; > > because it does not fail on any known platform. > > Actually, it DOES fail, on cygwin 1.7.0. But that is due to a bug in > cygwin wctomb[1]
So, activating the *printf replacements for this bug would not help, because the code in vasnprintf uses wcrtomb and would therefore exhibit the same behaviour as Cygwin's *printf. [1][2] Right? Bruno [1] http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdlib/wctomb_r.c?rev=1.8&content-type=text/x-cvsweb-markup&cvsroot=src [2] http://cygwin.com/cgi-bin/cvsweb.cgi/src/newlib/libc/stdlib/wctomb.c?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=src