Issue #8508 has been updated by thasmo (Thomas Deinhamer).


So it seems to be a problem with the used shell,
not the terminal. I've now tried Console2 running
the default Windows shell and the ZSH shell from the
Cygwin environment and using the Windows shell it
works, but using ZSH/Cygwin it throws the error.

Executing this: /cygdrive/c/HashiCorp/Vagrant/embedded/bin/ruby.exe --version
gives me: ruby 1.9.3p392 (2013-02-22) [i386-mingw32]

If I comment out line 172 it works.
# msg = msg[0, len].force_encoding(Encoding.find(Encoding.locale_charmap))

I've also found some guy having similar problems (I think):
http://www.microsofttranslator.com/bv.aspx?from=&to=de&a=http%3A%2F%2Fwiki.livedoor.jp%2Fkou1okada%2Fd%2FCygwin%2520-%2520Ruby-1.9.3p327%2520-%2520win32%2Fregistry
So not sure if that's related to this encoding problem.
----------------------------------------
Bug #8508: Invalid byte sequence in UTF-8 (ArgumentError) in win32/registry.rb
https://bugs.ruby-lang.org/issues/8508#change-39943

Author: thasmo (Thomas Deinhamer)
Status: Feedback
Priority: Normal
Assignee: cruby-windows
Category: M17N
Target version: 
ruby -v: 1.9.3
Backport: 1.9.3: UNKNOWN, 2.0.0: UNKNOWN


Hi guys!

I'm using Vagrant and the VMware workstation plugin to provision a VMware workstation VM
but in the end this doesn't work because I get an error in win32/registry.rb:

"C:/HashiCorp/Vagrant/embedded/lib/ruby/1.9.1/win32/registry.rb:173:in `tr': invalid byte sequence in UTF-8 (ArgumentError)"

The Vagrant debug log which includes the error trace can be found here:
https://gist.github.com/thasmo/12f88c7b1025aa5f2c32

The related Vagrant bug ticket can be found here:
https://github.com/mitchellh/vagrant/issues/1757#issuecomment-19175619

Please let me know if you need any further information on this!

Thanks a lot!


-- 
http://bugs.ruby-lang.org/