def encoding=(enc)
@encoding = Source::encoding_val(enc)
@buffer = utf8_enc(@buffer) if @encoding != UTF8
@to_utf = true
al = case @encoding
when UTF16; utf16:utf16
when UNILE; unile:unile
when ISO_8859_1; asc:asc
else
@to_utf = false
utf8:utf8
end
instance_eval "alias :encode #{al}"
end