Project

General

Profile

Actions

Backport #8943

closed

Invalid encoding for Windows Registry

Added by davispuh (Dāvis Mosāns) over 10 years ago. Updated almost 8 years ago.

Status:
Rejected
Assignee:
[ruby-core:57339]

Description

=begin
It's not possible to correctly read non-ASCII registry values. It's also not possible to write them with correct encoding.

to test import ((<test.reg|URL:https://gist.github.com/davispuh/6676385#file-test-reg>))

then ((<test3.rb|URL:https://gist.github.com/davispuh/6676377#file-test3-rb>))

Output on Ruby 2.0 (it's same for 1.9.3 except encoding is US-ASCII not UTF-8, but both are wrong)

N:\Projects>ruby test3.rb
UTF-8
�??�?�
"\xE5??\xE4?\xE2"
test

(it hangs here)

screenshot of registry after running it ((URL:http://i.imm.io/1gFES.png))

seems that whoever wrote Ruby code to interact with WinAPI had no idea about encodings/code pages Windows uses as there's loads of issues and they've been for years.
=end


Related issues 1 (0 open1 closed)

Related to Backport200 - Backport #8942: Wrong encoding for Windows native error messagesClosedwindows09/24/2013Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0