Skip to content

Parsing rtf file with simple text result junk in output #16

@ShockwaveNN

Description

@ShockwaveNN

Try to parse attached file
test.zip

LibreOffice and all other known to me editors correctly opens it
image

But parsing it with ruby-rtf result are:

require_relative 'lib/ruby-rtf'

rtf = RubyRTF::Parser.new.parse(File.open('/home/lobashov/temp/test.rtf').read)
rtf.sections.each do |sec|
  puts sec[:text]
end

Outpus (ignoring warnings about unknown control):

�đėĔ

ĖāĠĖ

ĄāĔā




�āĕĖ


 

Tested on ruby-rtf v0.0.5 with ruby 2.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions