Diego Garcia
Diego Garcia

Reputation: 536

Cocoapods on Windows invalid byte sequence in UTF-8 error

I'm currently trying to run cocoapods on Windows, but after installing it I try to run pod --version and get the following output:

Traceback (most recent call last):
    4: from C:/Ruby26-x64/bin/pod:23:in '<main>'
    3: from C:/Ruby26-x64/bin/pod:23:in 'load'
    2: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/bin/pod:55:in '<top (required)>'
    1: from C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command.rb:50:in 'run'
C:/Ruby26-x64/lib/ruby/gems/2.6.0/gems/cocoapods-1.9.0/lib/cocoapods/command.rb:168:in 'verify_xcode_license_approved!': invalid byte sequence in UTF-8 (ArgumentError)

I can't figure out what might be causing it. Any ideas?

Upvotes: 1

Views: 2844

Answers (2)

Resende
Resende

Reputation: 100

In my case, this command wasn't work in powershell, but in cmd.exe work fine! maybe this can help

Upvotes: 0

Diego Garcia
Diego Garcia

Reputation: 536

Answering my own question, the problem seems to be related to the terminal encoding. Windows terminal does not use UTF-8 by default, so you have to change it's encoding, you can set it to UTF-8 by running:

chcp 65001

Upvotes: 7

Related Questions