ruby-changes:18417
From: naruse <ko1@a...>
Date: Sat, 1 Jan 2011 04:26:37 +0900 (JST)
Subject: [ruby-changes:18417] Ruby:r30440 (trunk): * win32/win32.c (rb_w32_write_console): don't raise exception when
naruse 2011-01-01 04:26:30 +0900 (Sat, 01 Jan 2011) New Revision: 30440 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30440 Log: * win32/win32.c (rb_w32_write_console): don't raise exception when the conversion is for writing to console. Patched by Heesob Park [ruby-core:33999] Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30439) +++ ChangeLog (revision 30440) @@ -1,3 +1,9 @@ +Sat Jan 1 04:20:11 2011 NARUSE, Yui <naruse@r...> + + * win32/win32.c (rb_w32_write_console): don't raise exception when + the conversion is for writing to console. + Patched by Heesob Park [ruby-core:33999] + Fri Dec 31 12:02:06 2010 Tanaka Akira <akr@f...> * enum.c (enum_sort_by): use less temporary objects. Index: win32/win32.c =================================================================== --- win32/win32.c (revision 30439) +++ win32/win32.c (revision 30440) @@ -5312,8 +5312,8 @@ !rb_econv_has_convpath_p(rb_enc_name(rb_enc_get(str)), "UTF-16LE")) return -1L; - str = rb_str_encode(str, rb_enc_from_encoding(rb_enc_find("UTF-16LE")), 0, - Qnil); + str = rb_str_encode(str, rb_enc_from_encoding(rb_enc_find("UTF-16LE")), + ECONV_INVALID_REPLACE|ECONV_UNDEF_REPLACE, Qnil); if (!WriteConsoleW(handle, (LPWSTR)RSTRING_PTR(str), RSTRING_LEN(str)/2, &reslen, NULL)) { if (GetLastError() == ERROR_CALL_NOT_IMPLEMENTED) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/