Class: REXML::IOSource

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/out_jabber.rb

Overview

Deal with Fluentd’s Encoding.default_internal = ‘ASCII_8BIT’.

Instance Method Summary collapse

Instance Method Details

#orig_readlineObject



14
# File 'lib/fluent/plugin/out_jabber.rb', line 14

alias orig_readline readline

#readline(*args) ⇒ Object



15
16
17
18
19
# File 'lib/fluent/plugin/out_jabber.rb', line 15

def readline(*args)
  line = orig_readline(*args)
  line = line.force_encoding(::Encoding::UTF_8) if line.encoding == ::Encoding::ASCII_8BIT
  line
end