Ruby-RTF icon indicating copy to clipboard operation
Ruby-RTF copied to clipboard

Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT

Open an-nasir opened this issue 7 years ago • 0 comments

Hi, I was using this gem for parsing rtf file ruby version is 2.4.0 and rails is 'rails', '~> 5.1.4'when I execute doc = RubyRTF::Parser.new.parse(File.open(path).read)`

where "path" being equal to a rtf file in public folder -- Ruby native File loads file. CompatibilityError in ruby-rtf-0.0.3/lib/ruby-rtf/parser.rb:187:in handle_control'`

Any help or reference to any rtf parser without JAVA dependencies I know there are 2 such gems?

an-nasir avatar Jan 31 '18 15:01 an-nasir