incompatible character encoding error

27 views
Skip to first unread message

Sorcerer Stone

unread,
Dec 3, 2019, 12:13:42 PM12/3/19
to Vagrant
I am using Win10 with HyperV disabled & with all the latest updates. Using Vagrant to test run some simple projects. No problems (in running docker, compose, etc in Vagrant).
I uninstalled Vagrant, VirtualBox and all related folders in Windows and reinstalled Vagrant & VirtualBox again. But suddenly, I ran into unicode problem.

Background:
After re-installing Vagrant (+ Virtualbox) and rebooted the OS, I ran this command to install docker compose:

vagrant plugin install vagrant-docker-compose

It returned a list of errors relating to unicode

Installing the 'vagrant-docker-compose' plugin. This can take a few minutes...
C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:852:in `[]=': incompatible character encodings: UTF-8 and ASCII-8BIT (Encoding::CompatibilityError)
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:852:in `sender'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:525:in `block in fetch_resource'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:1133:in `block (3 levels) in resolv'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:1131:in `each'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:1131:in `block (2 levels) in resolv'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:1130:in `each'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:1130:in `block in resolv'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:1128:in `each'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:1128:in `resolv'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:520:in `fetch_resource'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:510:in `each_resource'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/resolv.rb:491:in `getresource'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/remote_fetcher.rb:105:in `api_endpoint'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/source.rb:47:in `api_uri'
        from C:/HashiCorp/Vagrant/embedded/mingw64/lib/ruby/2.4.0/rubygems/source.rb:183:in `load_specs'
....

What I did to try to resolve this problem:
I followed the instructions from here: https://github.com/xyteam/xyPlatform

Near the end of the article, there is a trouble shooting section. 2nd last entries on this section deals with the problem I ran into. So I edited and saved line 784 in resolv.rb as described in this article. aka

replace request[0,2] = [id].pack('n') to request[0,2] = [id].pack('U')

I rebooted the system. Ran the above command.
I still have the same character encoding error.

Can someone please advise what other steps I need to take to fix this error?
What might have suddenly prompted this error?
I had since then uninstalled and reinstalled both Vagrant & Virtualbox (latest available versions). Same result.

Thanks in advance.

Sorcerer Stone

unread,
Dec 3, 2019, 12:54:33 PM12/3/19
to Vagrant
One more thing - to eliminate from what might have caused the encoding problem mentioned above.
I don't have special characters in my username or in my Vagrant's HashiCorp's directory path (in fact, no special characters assigned by me in my Windows system)

Sorcerer Stone

unread,
Dec 3, 2019, 1:45:11 PM12/3/19
to Vagrant
Problem resolved.
It is this file resolv.rb that caused the encoding problem.
There are 3 entries in this file that need to manually reset to unicode. I thought there was only 1 line - where the error code said.
Anyway, why I did not have this problem before is even more puzzling.


On Tuesday, December 3, 2019 at 12:13:42 PM UTC-5, Sorcerer Stone wrote:
Reply all
Reply to author
Forward
0 new messages