encoding=(enc)
public
Inherited from Encoding Overridden to support
optimized en/decoding
Show source
def encoding=(enc)
return unless super
@line_break = encode( '>' )
if enc != UTF_8
@buffer = decode(@buffer)
@to_utf = true
else
@to_utf = false
if @buffer.respond_to? :force_encoding
@buffer.force_encoding Encoding::UTF_8
end
end
end