Project

General

Profile

This project is closed and read-only.

Actions

Backport #8942

closed

Wrong encoding for Windows native error messages

Backport #8942: Wrong encoding for Windows native error messages

Added by davispuh (Dāvis Mosāns) almost 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
[ruby-core:57336]

Description

=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


Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8943: Invalid encoding for Windows RegistryRejectedwindowsActions

Updated by luislavena (Luis Lavena) almost 13 years ago Actions #1 [ruby-core:57341]

  • Status changed from Open to Feedback
  • Assignee set to windows

Hello,

Can you update the gist or provide here, inline with the ticket, the output you're receiving? It will be much faster for developers to be able to see the specific error than guessing the output.

It is normal to receive translated responses, question on how these error messages gets translated and formatted might not be relevant. If you can provide the specific that is affecting you, will be much appreciated.

Updated by davispuh (Dāvis Mosāns) almost 13 years ago Actions #2 [ruby-core:57342]

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

Updated by usa (Usaku NAKAMURA) almost 13 years ago Actions #3

  • Tracker changed from Bug to Backport
  • Project changed from Ruby to 15
  • Status changed from Feedback to Assigned

It's already fixed at trunk by a part of r41838.

Updated by usa (Usaku NAKAMURA) almost 13 years ago Actions #4 [ruby-core:59057]

  • Status changed from Assigned to Closed
Actions

Also available in: PDF Atom