Project

General

Profile

« Previous | Next » 

Revision 0d16c36d

Added by Josh Cooper 8 months ago

[win32/registry] Fallback to UTF-8 for unknown codepages

There are some codepages like cp708 for which no ruby encoding exists:

$ ruby -e "Encoding.find('cp708')"
Traceback (most recent call last):
    1: from -e:1:in `<main>'
-e:1:in `find': unknown encoding name - cp708 (ArgumentError)

win32/registry uses ENCODING to transcode error messages and expand environment
variables from UTF-16LE, so using UTF-8 seems like the best choice and is better
than a hard failure.

This should resolve [Bug #13831]