win32/registry.rb: encode name

* ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): encode
  name.
* ext/win32/lib/win32/registry.rb (Win32::Registry#each_key): ditto.
* ext/win32/lib/win32/registry.rb (Win32::Registry#export_string):
  encode to locale encoding if default internal is not set.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
win32/registry.rb: size in bytes

* ext/win32/lib/win32/registry.rb (Win32::Registry#write): data size
  is in bytes, not chars.  terminators should be placed automatically.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43031 b2dd03c8-39d4-4d8f-98ff-823fe69b080e