凡庸なる人のブログ

凡庸な自分が思ったことや何かしらの感想、コンピュータ系などの調べごとを書くブログです。  【結論】ってのは私個人の結論です。記事全体は個人的な調査結果や感想です。

vagrant up したときの「`encode': "\xA0" on Windows-31J (Encoding::InvalidByteSequenceError) 」エラー

メモ的な備忘録

【結論】

git bash文字コードUTF-8ではなかった。

【どうやって解決したか】

1.snapshotを削除した。

vagrant reloadで再起動したら、エラーが出なかった。

2.git bash文字コードutf-8にした。

vagrant snapshot save XXX とし、vagrant reloadで再起動してもエラーが無かった。

【そもそも何が起きたか】================================

vagrant upしたときに、以下のエラーが結構な行続いた。

C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/io.rb:32:in `encode': "\xA0" on Windows-31J (Encoding::InvalidByteSequenceError)
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/io.rb:32:in `read_until_block'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/subprocess.rb:230:in `block in execute'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/subprocess.rb:228:in `each'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/subprocess.rb:228:in `execute'
        from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-2.0.2/lib/vagrant/util/subprocess.rb:22:in `execute'

================================

面白いことにvagrant自体の起動できており、ssh接続も可能だった。

ぐぐってみたら同じような症状の人がいた。

VagrantコマンドでEncoding::InvalidByteSequenceError - Qiita

Windowsでberks(Berkshelf)コマンドを実行した際、「”\xA0″ on Windows-31J (Encoding::InvalidByteSequenceError)」エラーが出るとき | misty-magic.h

どれも、Vagrantのコアファイル的な部分を修正して対応していたけど、CLIクライアント側の設定で対応したほうがいいと思うんだけどなぁ。

文字コードはなんとなく、UTF-8が好きなので、Windows-31J ではなくUTF-8にしたい。