WIN32 registry throwing an error when searching for a key

Hi,
We are facing an issue with the method ‘export_string’ in registry.rb in
the previous version of ruby(1.9.3) we haven’t seen this method and now
when we are searching for a key mean while when it encountered a key
with ‘™ tm’ then its throwing an error like ,

“C:/Ruby23/lib/ruby/2.3.0/win32/registry.rb:908:in `encode’: U+2122 to
IBM437 in
conversion from UTF-16LE to UTF-8 to IBM437
(Encoding::UndefinedConversionError)”

How can we resolve this issue, can any one help me out.
Current ruby version ruby-2.3.3

Thanks,
Ranjith Ganapuram

I understand that you get an exception when this character is converted
to IBM437, but I don’t understand why this conversion is done. It
could be a bug in Ruby 2.3, but for the safe side, can you show the
complete stack trace and in particular that part of your code, where you
invoke the respective method from the Win32::Registry class?

In my registry there is a key it includes ‘TM’ symbol so it is unable to
decode at that time and I have just included the
Encoding.default_internal=“UTF-8”
In my ruby script where am calling win32 registry then it’s working
fine.

Did you have a different default internal encoding before? AFIK, the
internal encoding is always UTF-8, unless you specify it otherwise.
That’s why I thought at first that this might have been a bug in the
Ruby library.

No we don’t have any internal encoding part and for the ruby 1.9.3 it
doesn’t raise any error but this error occuring while upgrading to ruby
2.3.3 version

If this is the case, maybe it is a bug in Ruby, because IMO you should
not be required to do this setting, because, from my understanding,
UTF-8 is supposed to be the default. I can’t test it because I don’t
have a comparable Ruby system installed.

May I suggest that you open a bug report on this issue?

Okay Ronald.
Where can I raise this bug ?

Ranjith Ganapuram wrote in post #1185538:

Okay Ronald.
Where can I raise this bug ?

Well, it depends on which implementation of Ruby you have! You told us
only that this is on Windows, but there are several Ruby implementations
on Windows.

But you can usually find information on where/how to open a bug report,
by either going to the website of the implementer, or by just googling
for it.