# RFC9839
[](https://pypi.org/project/rfc9839)
[](https://coveralls.io/github/elliotwutingfeng/rfc9839?branch=main)
[](LICENSE)
Python library to check for problematic Unicode code points.
Port of [Go library of the same name](https://github.com/timbray/rfc9839).
Based on the Unicode code-point subsets specified in [RFC9839](https://www.rfc-editor.org/rfc/rfc9839.html).
## Usage
```python
from rfc9839 import unicode_scalar, xml_character, unicode_assignable
code_point = 0xFDDA # ARABIC LIGATURE SAD WITH MEEM WITH ALEF MAKSURA FINAL FORM
print(unicode_scalar.is_valid_code_point(code_point)) # True
print(xml_character.is_valid_code_point(code_point)) # True
print(unicode_assignable.is_valid_code_point(code_point)) # False
print(unicode_assignable.is_valid_string(chr(code_point))) # False
print(xml_character.is_valid_utf8(chr(code_point).encode("utf-8"))) # True
```
Raw data
{
"_id": null,
"home_page": null,
"name": "rfc9839",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "unicode, rfc9839, surrogates, control codes, noncharacters, unicode scalars, xml characters, unicode assignables, security",
"author": "Wu Tingfeng",
"author_email": "Wu Tingfeng <wutingfeng@outlook.com>",
"download_url": "https://files.pythonhosted.org/packages/16/45/99785385cfc7ab424518988f97b343430d5d6ae1d34127153fb4b5d090c8/rfc9839-0.0.2.tar.gz",
"platform": null,
"description": "# RFC9839\n\n[](https://pypi.org/project/rfc9839)\n[](https://coveralls.io/github/elliotwutingfeng/rfc9839?branch=main)\n[](LICENSE)\n\nPython library to check for problematic Unicode code points.\n\nPort of [Go library of the same name](https://github.com/timbray/rfc9839).\n\nBased on the Unicode code-point subsets specified in [RFC9839](https://www.rfc-editor.org/rfc/rfc9839.html).\n\n## Usage\n\n```python\nfrom rfc9839 import unicode_scalar, xml_character, unicode_assignable\n\ncode_point = 0xFDDA # ARABIC LIGATURE SAD WITH MEEM WITH ALEF MAKSURA FINAL FORM\n\nprint(unicode_scalar.is_valid_code_point(code_point)) # True\nprint(xml_character.is_valid_code_point(code_point)) # True\nprint(unicode_assignable.is_valid_code_point(code_point)) # False\n\n\nprint(unicode_assignable.is_valid_string(chr(code_point))) # False\nprint(xml_character.is_valid_utf8(chr(code_point).encode(\"utf-8\"))) # True\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Python library to check for problematic Unicode code points.",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/elliotwutingfeng/rfc9839",
"Issues": "https://github.com/elliotwutingfeng/rfc9839/issues"
},
"split_keywords": [
"unicode",
" rfc9839",
" surrogates",
" control codes",
" noncharacters",
" unicode scalars",
" xml characters",
" unicode assignables",
" security"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "14787081fa3751791a5a5dff559c8d0fbe2fe1c583be9239a99cbcec1170bacf",
"md5": "08850b111d9a5ba521e369d5a7239725",
"sha256": "f99dfb99799a6b3650f907ee4d578b458f89613603611892c93efb7aceb8d4cc"
},
"downloads": -1,
"filename": "rfc9839-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "08850b111d9a5ba521e369d5a7239725",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 4110,
"upload_time": "2025-09-04T08:33:09",
"upload_time_iso_8601": "2025-09-04T08:33:09.857552Z",
"url": "https://files.pythonhosted.org/packages/14/78/7081fa3751791a5a5dff559c8d0fbe2fe1c583be9239a99cbcec1170bacf/rfc9839-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "164599785385cfc7ab424518988f97b343430d5d6ae1d34127153fb4b5d090c8",
"md5": "c8982b71304a2211df1ddbd3c50fe807",
"sha256": "59d0ff00eec10af10668dd0079c99f6f0f2bc59f8b8cd7b1ba7584d2245752cd"
},
"downloads": -1,
"filename": "rfc9839-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "c8982b71304a2211df1ddbd3c50fe807",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 3020,
"upload_time": "2025-09-04T08:33:11",
"upload_time_iso_8601": "2025-09-04T08:33:11.072483Z",
"url": "https://files.pythonhosted.org/packages/16/45/99785385cfc7ab424518988f97b343430d5d6ae1d34127153fb4b5d090c8/rfc9839-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-04 08:33:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "elliotwutingfeng",
"github_project": "rfc9839",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rfc9839"
}