pptx/core-properties-unicode

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: —

Metadata

Feature idpptx/core-properties-unicode
Formatpptx
Categorymetadata
Spececma-376-5-part-2 § 11.1

XPath assertions

ID / partPredicateXPathpython-pptxpptxjs
unicode-title-value
docProps/core.xml
equal = 测试标题 مرحبا 👨‍👩‍👧
The <dc:title> element must preserve CJK, Arabic and emoji bytes verbatim.
//dc:title
unicode-creator-value
docProps/core.xml
equal = 作者 كاتب 📝
The <dc:creator> element must preserve CJK, Arabic and emoji bytes verbatim.
//dc:creator

Render assertions

No render assertions declared.

Generator source

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())

Manifest (expanded)

{
  "$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."
    }
  ]
}

Fixture

Download core-properties-unicode.pptx (27.4 KB)

Reference preview

No rendered reference is available for this case.

Spec notes

Same rationale as docx/core-properties-unicode: any authoring-library normalisation that mangles high-plane / RTL / ZWJ-joined codepoints will surface here.