lib/rchardet/utf8prober.rb in rchardet-1.2 vs lib/rchardet/utf8prober.rb in rchardet-1.3
- old
+ new
@@ -45,10 +45,11 @@
def get_charset_name
return "utf-8"
end
def feed(aBuf)
- for c in aBuf.split('')
+ aBuf.each_byte do |b|
+ c = b.chr
codingState = @_mCodingSM.next_state(c)
if codingState == EError
@_mState = ENotMe
break
elsif codingState == EItsMe