Comments (2)
So far as I can tell, the RTF file you sent me for this is invalid: It clearly defines \f3 as a Symbol font, and then tries to use it for "Normal Table", which ain't valid symbol codepoints.
That said, I've attempted three different fixes:
- Symbol is now implemented as a custom codec, rather than a dict and typecheck tricks in the reader.
- You can pass an "errors" argument to the reader, values "replace" or "strict", and it will pass it along to its codecs, including Symbol (and also use it for non-BMP unicode chars in narrow Pythons)
- Inside an ignored group and its subgroups, everything is now totally ignored, so that we can't crash on things we don't handle inside groups we don't care about. This "fixes" your sample file.
from pyth.
Cool, that sounds good. But it`s a shame that Word 2003 produces invalid rtf files some how.
from pyth.
Related Issues (20)
- Feature request: Add support for reading simple RTF tables HOT 1
- CJK characters support for RTF parse HOT 5
- Please upload a new release to PyPi HOT 3
- newline for plaintext writer HOT 2
- Hex (encoded images) in `\pict` control groups is not removed. HOT 5
- Implement lists in RTF reader HOT 1
- Bump to 0.6.1? HOT 4
- Python 3 support HOT 2
- Add more tests, for instance from unrtf HOT 1
- pyth.__version__ claims to be 0.5.6 even though packaged as 0.6.0
- Exclude images when writing plain text files
- Parsing RTF fails when an escaped quote is followed by non-hex digits
- PlainTextWriter adds extraneous newline after each paragraph
- Unicode error when reading RTF HOT 3
- Import field text from RTFs
- Parse colortbl and colored text
- Request - Support for parsing string instead of file
- problem with reading file.rtf with table inside
- wiki.github.com/brendonh/pyth is a broken link
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyth.