Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove miq-unicode.rb #509

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions lib/gems/pending/util/miq-unicode.rb

This file was deleted.

4 changes: 2 additions & 2 deletions lib/gems/pending/util/win32/miq-powershell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require 'io/wait'
require 'open-uri'
require 'util/miq-encode'
require 'util/miq-unicode'
require 'win32/registry' if Sys::Platform::OS == :windows

module MiqPowerShell
Expand Down Expand Up @@ -94,7 +93,8 @@ def self.is_error_object?(xml)
end

def self.run_script(script)
encoded_command = MIQEncode.encode(script.AsciiToUtf8.Utf8ToUnicode, false)
string = script.dup.force_encoding("ISO-8859-1").encode("UTF-16LE")
encoded_command = MIQEncode.encode(string, false)
ps_command = "-EncodedCommand #{encoded_command}"
execute(ps_command)
end
Expand Down
93 changes: 0 additions & 93 deletions spec/util/miq-unicode_spec.rb

This file was deleted.