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-pptx: — pptxjs: —
| Feature id | pptx/core-properties-unicode |
|---|---|
| Format | pptx |
| Category | metadata |
| Spec | ecma-376-5-part-2 § 11.1 |
| ID / part | Predicate | XPath | python-pptx | pptxjs |
|---|---|---|---|---|
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_pptx.py
#!/usr/bin/env python3
"""Generate ``fixtures/pptx/core-properties-unicode.pptx``.
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 pptx import Presentation
_REPO_ROOT = Path(__file__).resolve().parent.parent
_OUT = _REPO_ROOT / "fixtures" / "pptx" / "core-properties-unicode.pptx"
_REPRODUCIBLE_DT = _dt.datetime(2000, 1, 1, 0, 0, 0)
_PINNED_CREATED = _dt.datetime(2026, 1, 1, 0, 0, 0, tzinfo=_dt.timezone.utc)
_PINNED_MODIFIED = _dt.datetime(2026, 1, 2, 0, 0, 0, tzinfo=_dt.timezone.utc)
def main() -> int:
prs = Presentation()
prs.slides.add_slide(prs.slide_layouts[6])
cp = prs.core_properties
cp.created = _PINNED_CREATED
cp.modified = _PINNED_MODIFIED
cp.title = "测试标题 مرحبا \U0001f468\U0001f469\U0001f467"
cp.author = "作者 كاتب \U0001f4dd"
_OUT.parent.mkdir(parents=True, exist_ok=True)
prs.save(_OUT, zip_date_time=_REPRODUCIBLE_DT)
print(_OUT)
return 0
if __name__ == "__main__":
raise SystemExit(main())
{
"$schema": "../manifest.schema.json",
"id": "pptx/core-properties-unicode",
"title": "Core properties: non-ASCII round-trip (CJK + RTL + emoji)",
"format": "pptx",
"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 docx/core-properties-unicode: any authoring-library normalisation that mangles high-plane / RTL / ZWJ-joined codepoints will surface here."
},
"fixtures": {
"machine": "pptx/core-properties-unicode"
},
"generator": {
"python": "scripts/gen_core_properties_unicode_pptx.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.