Proves that ``dc:title`` and ``dc:creator`` round-trip bytes with non-ASCII payloads covering CJK ideographs, right-to-left Arabic, and a multi-codepoint emoji.
Library verdicts: python-xlsx: — xlsxjs: —
| Feature id | xlsx/core-properties-unicode |
|---|---|
| Format | xlsx |
| Category | metadata |
| Spec | ecma-376-5-part-2 § 11.1 |
| ID / part | Predicate | XPath | python-xlsx | xlsxjs |
|---|---|---|---|---|
unicode-title-valuedocProps/core.xml | equal = 测试标题 مرحبا 👨👩👧The <dc:title> element must preserve CJK, Arabic and emoji bytes verbatim. | //dc:title | — | — |
unicode-creator-valuedocProps/core.xml | equal = 作者 كاتب 📝The <dc:creator> element must preserve CJK, Arabic and emoji bytes verbatim. | //dc:creator | — | — |
No render assertions declared.
scripts/gen_core_properties_unicode_xlsx.py
#!/usr/bin/env python3
"""Generate ``fixtures/xlsx/core-properties-unicode.xlsx``.
Exercises the non-ASCII round-trip path for ``dc:title`` and ``dc:creator``.
"""
from __future__ import annotations
import datetime as _dt
from pathlib import Path
from xlsx import Workbook
_REPO_ROOT = Path(__file__).resolve().parent.parent
_OUT = _REPO_ROOT / "fixtures" / "xlsx" / "core-properties-unicode.xlsx"
_REPRODUCIBLE_DT = _dt.datetime(2000, 1, 1, 0, 0, 0)
_PINNED_CREATED = _dt.datetime(2026, 1, 1, 0, 0, 0)
_PINNED_MODIFIED = _dt.datetime(2026, 1, 2, 0, 0, 0)
def main() -> int:
wb = Workbook()
wb.properties.created = _PINNED_CREATED
wb.properties.modified = _PINNED_MODIFIED
wb.properties.title = "测试标题 مرحبا \U0001f468\U0001f469\U0001f467"
wb.properties.creator = "作者 كاتب \U0001f4dd"
_OUT.parent.mkdir(parents=True, exist_ok=True)
wb.save(_OUT, zip_date_time=_REPRODUCIBLE_DT)
print(_OUT)
return 0
if __name__ == "__main__":
raise SystemExit(main())
{
"$schema": "../manifest.schema.json",
"id": "xlsx/core-properties-unicode",
"title": "Core properties: non-ASCII round-trip (CJK + RTL + emoji)",
"format": "xlsx",
"category": "metadata",
"summary": "Proves that ``dc:title`` and ``dc:creator`` round-trip bytes with non-ASCII payloads covering CJK ideographs, right-to-left Arabic, and a multi-codepoint emoji.",
"spec": {
"source": "ecma-376-5-part-2",
"clause": "11.1",
"notes": "Same rationale as the docx and pptx unicode families: the authoring library's string handling path between Python and the XML serialiser is what's under test."
},
"fixtures": {
"machine": "xlsx/core-properties-unicode"
},
"generator": {
"python": "scripts/gen_core_properties_unicode_xlsx.py"
},
"assertions": [
{
"id": "unicode-title-value",
"part": "docProps/core.xml",
"namespaces": {
"cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
"dc": "http://purl.org/dc/elements/1.1/"
},
"xpath": "//dc:title",
"must": "equal",
"value": "测试标题 مرحبا 👨👩👧",
"description": "The <dc:title> element must preserve CJK, Arabic and emoji bytes verbatim."
},
{
"id": "unicode-creator-value",
"part": "docProps/core.xml",
"namespaces": {
"cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties",
"dc": "http://purl.org/dc/elements/1.1/"
},
"xpath": "//dc:creator",
"must": "equal",
"value": "作者 كاتب 📝",
"description": "The <dc:creator> element must preserve CJK, Arabic and emoji bytes verbatim."
}
]
}
No rendered reference is available for this case.