4 ms·
If you use a non-Latin alphabet, Microsoft Word’s RTF output is a horrific mess of encoding switches everywhere that makes manual text extraction pretty much un
by mananaysiempre 1y ago
If you use a non-Latin alphabet, Microsoft Word’s RTF output is a horrific mess of encoding switches everywhere that makes manual text extraction pretty much untenable (and while RTF can use both UCS-2 and Windows codepages, Word seems to stick to—potentially multiple—codepages if it can, presumably for compatibility). That said, Microsoft always intended RTF to be Word’s exchange and archival format (unlike DOC, which was a mess they did not want to document), so it has enough of an official spec that extracting text, at least, is very possible.
- torstenvl 1y agoRTF uses UTF-16, not UCS-2; you can in fact use two \u____ commands in a row using surrogate pairs. Anyway, I wonder if this would work for you. https://github.com/torstenvl/rtfproc https://github.com/torstenvl/rtfproc