Coder Social home page Coder Social logo

unicode rtf to text Garbled about striprtf HOT 3 CLOSED

joshy avatar joshy commented on May 20, 2024
unicode rtf to text Garbled

from striprtf.

Comments (3)

joshy avatar joshy commented on May 20, 2024

Hi kqmonitor,

thanks for the report. This rtf is causing indeed garbled output. A simple use case

{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}{\f4\froman\fprq2\fcharset0 Liberation Sans{\*\falt Arial};}{\f5\fnil\fprq2\fcharset0 Lohit Devanagari;}{\f6\fnil\fprq2\fcharset0 Liberation Serif{\*\falt Times New Roman};}}
{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
{\stylesheet{\s0\snext0\ql\widctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang1033\loch\f3\fs24\lang1033 Normal;}
{\s15\sbasedon0\snext16\ql\widctlpar\hyphpar0\sb240\sa120\keepn\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang1033\loch\f4\fs28 Heading;}
{\s16\sbasedon0\snext16\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang1033\loch\f3\fs24 Text Body;}
{\s17\sbasedon16\snext17\sl276\slmult1\ql\widctlpar\hyphpar0\sb0\sa140\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang1033\loch\f3\fs24 List;}
{\s18\sbasedon0\snext18\ql\widctlpar\hyphpar0\sb120\sa120\ltrpar\cf1\i\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang1033\loch\f3\fs24 Caption;}
{\s19\sbasedon0\snext19\ql\widctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang1033\loch\f3\fs24 Index;}
}{\*\generator LibreOffice/6.0.7.3$Linux_X86_64 LibreOffice_project/00m0$Build-3}{\info{\creatim\yr2020\mo12\dy11\hr12\min28}{\revtim\yr2020\mo12\dy11\hr12\min31}{\printim\yr0\mo0\dy0\hr0\min0}}{\*\userprops}\deftab709
\hyphauto0\viewscale100
{\*\pgdsctbl
{\pgdsc0\pgdscuse451\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default Style;}}
\formshade\paperh16838\paperw11906\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn11906\pghsxn16838\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
{\*\ftnsep\chftnsep}\pgndec\pard\plain \s0\ql\widctlpar\hyphpar0\ltrpar\cf1\kerning1\dbch\af5\langfe1081\dbch\af6\afs24\alang1033\loch\f3\fs24\lang1033{\cf1\kerning1\fs24\langfe1081\dbch\af6\afs24\alang1033\rtlch \ltrch\dbch\loch\f3
\u26580\'3f\u36947\'3f}
\par }

like this one is working. With what program did you create the rtf?

Thanks,
Joshy

from striprtf.

RustSpark avatar RustSpark commented on May 20, 2024

I had the same problem.
image -> Word

from striprtf.

joshy avatar joshy commented on May 20, 2024

Is fixed now with version 0.0.15

from striprtf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.