diff options
author | ytti <saku@ytti.fi> | 2018-04-25 16:30:52 +0300 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2018-04-25 16:30:52 +0300 |
commit | 8afffb852b55dfa74f2e694e5c27d9db4cc34373 (patch) | |
tree | 3c842505264f832ecadc9b386bd9a48a110ca1fa /lib/oxidized/model | |
parent | 583bc422448a234a215113a15f8a6976c50b2296 (diff) |
Add option to force input string into 8bit-ascii
Essentially binary blob or UTF8
Closes #1210
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/model.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/oxidized/model/model.rb b/lib/oxidized/model/model.rb index a650560..438357f 100644 --- a/lib/oxidized/model/model.rb +++ b/lib/oxidized/model/model.rb @@ -91,6 +91,7 @@ module Oxidized Oxidized.logger.debug "lib/oxidized/model/model.rb Executing #{string}" out = @input.cmd(string) return false unless out + out = out.b unless Oxidized.config.input.utf8_encoded? self.class.cmds[:all].each do |all_block| out = instance_exec Oxidized::String.new(out), string, &all_block end |