striprtf icon indicating copy to clipboard operation
striprtf copied to clipboard

Handling fcharset correctly

Open kota7 opened this issue 1 year ago • 0 comments

Integer codes are actually handled by \fcharsetN parameter defined in the \fonttbl section. A section in the document received a font spec given as \fN, which is defined in \fonttbl. A font spec has a \fcharsetN or \cpgN definition, which tells which code mapping to apply.

For example, fcharset0 is for ANSI, fcharset128 is for Shift Jis, fcharset134 is for GB2312.

This is not correctly handled in the current version (v0.6.0), where we (perhaps wrongly) assumed that a file only uses the code mapping given in the \ansicpgN code page.

Reference:

  • https://latex2rtf.sourceforge.net/rtfspec_6.html
  • https://asthmacommunitynetwork.org/file/3082/download?token=x9EMWwFO

kota7 avatar Aug 10 '23 04:08 kota7