lib/ffi-icu/chardet.rb in ffi-icu-0.1.5 vs lib/ffi-icu/chardet.rb in ffi-icu-0.1.6
- old
+ new
@@ -71,10 +71,11 @@
result
end
def set_text(text)
Lib.check_error do |status|
- Lib.ucsdet_setText(@detector, text, text.bytesize, status)
+ data = FFI::MemoryPointer.from_string(text)
+ Lib.ucsdet_setText(@detector, data, text.bytesize, status)
end
end
end # Detector
end # CharDet