mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-24 10:27:44 -06:00
RTF import read every 8-bit byte as Windows-1252, so Cyrillic (and any other non-Western) RTF came out as mojibake. Bytes now decode in the current font's code page (\fcharset, \cpg), else the default font's, else the document's (\ansicpg), for the single-byte Windows code pages 874 and 1250-1258. A .doc, .docx or .rtf whose content is another of these formats now opens by its signature, as Word does: RTF saved as .doc (hh.ru résumés and accounting exports are commonly saved that way), a .docx renamed .doc, a Word 97-2003 file renamed .docx. Co-authored-by: Магда М.Г. <mail@mgmagda.ru> Co-authored-by: Brandon Thomas <echelon@gmail.com>