--- id: rtfunicode version: "2.3" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # rtfunicode — Encoder for unicode to RTF 1.5 command sequences License: permissive · Maintenance: active · Downloads: 134.0K/mo ## What it is and what it does rtfunicode is a codec module that bridges Unicode and RTF by converting Unicode strings into valid RTF 1.5 command sequences. When imported, it registers a new codec that allows you to call `.encode('rtfunicode')` on any Unicode string, transforming international characters into RTF escape codes of the form `\uN?`, where N is a signed 16-bit integer and ? is a placeholder character for older RTF readers. The package is lightweight with no external dependencies and is designed for developers who need to generate RTF documents containing non-ASCII characters. It has been maintained since 2012 and currently requires Python 3.10 or newer. The implementation is straightforward: it converts each Unicode character to its RTF command equivalent, making it useful for applications that export text data to RTF format while preserving international characters. Use it for: - Export Unicode text to RTF documents with proper international character encoding for word processors. - Generate RTF reports or templates containing non-ASCII characters from Python applications. - Convert user-supplied Unicode strings to RTF-compatible bytecode in document generation pipelines. - Ensure backward compatibility with older RTF readers by encoding Unicode as RTF escape sequences. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Encodes Unicode strings to RTF 1.5 command sequences, registering a codec that converts Unicode characters into valid RTF bytecode for international character support. Yes. The package is lightweight, actively maintained, has no dependencies, and solves a specific problem with a clean API. It carries permissive licensing and no known vulnerabilities. Install it if you need to generate RTF output with international characters; skip it if you don't work with RTF. ## Install pip install rtfunicode uv add rtfunicode poetry add rtfunicode ## Installing rtfunicode Before you install: Low install friction with no runtime dependencies. Actively maintained with recent commits and a stable release history since 2012; last release was 2026-01-17. License in practice: BSD-2-Clause is permissive, allowing commercial and private use with minimal restrictions; attribution and license text preservation are required. Quickstart: import rtfunicode 'RTF and unicode mix just fine! \u263A'.encode('rtfunicode') Requires Python 3.10 or newer. Verify before relying: - Whether the codec handles all Unicode planes or only the Basic Multilingual Plane (BMP) via 16-bit signed integers. - Performance characteristics when encoding large documents or streams with many non-ASCII characters. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 134.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags unicode to rtf encoding, rtf codec python, international characters rtf, unicode rtf conversion, rtf command sequences, rtf bytecode encoder, rtf-export, unicode-codec, text-encoding [View on SkillFed](https://skillfed.io/packages/rtfunicode) · [View on PyPI](https://pypi.org/project/rtfunicode/)