Issue #8942 has been updated by davispuh (D??vis Mos??ns).


I did put links to gist in post. Output on "Ruby 2.0" (that's link). But ok here output again: https://gist.github.com/davispuh/6676016#file-rubybug
----------------------------------------
Bug #8942: Wrong encoding for Windows native error messages
https://bugs.ruby-lang.org/issues/8942#change-41948

Author: davispuh (D??vis Mos??ns)
Status: Feedback
Priority: Normal
Assignee: cruby-windows
Category: 
Target version: 
ruby -v: ruby 2.0.0p247 (2013-06-27) [x64-mingw32]
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


=begin
Ruby uses console's encoding/code page for Windows native error messages, but that's wrong. Windows error messages aren't related to console at all. To get code page for WinAPI ANSI (A) functions have to use ((<GetACP|URL:http://msdn.microsoft.com/en-us/library/dd318070.aspx>))

But even better would be to use Wide/Unicode (W) functions then don't have to worry about encoding as everything would be UTF-16

I've localized version of Windows and so all error messages are translated.

Here's ((<test2.rb|URL:https://gist.github.com/davispuh/6675912#file-test2-rb>)) script (windows-1257 is code page used by windows for me so by changing to it I get correct output)

Output on ((<Ruby 2.0|URL:https://gist.github.com/davispuh/6676016#file-rubybug>)) (it's exactly same for 1.9.3) (that error message "Sist??ma nevar atrast nor??dīto failu." means "The system cannot find the file specified")

It's probably not only place where are such issue with encoding.

=end



-- 
http://bugs.ruby-lang.org/