You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unicode \u202f breaks the next pages of template #627
I recently develop auto document generation using gpt-oss:20b model. Unexpectedly, the model gives output like 5\u202fseconds and this results a bug to the template where all next pages disappeared.
Expected behavior
I think we should normalize the problematic unicode before rendering.
I could not reproduce this yet against a wheel built from current master (1f143fbe86c19ecb28c3205d5f4b1547c7e2d7ad).
I created a two-page DOCX template with the value on page 1 and a fixed SECOND_PAGE_MARKER after an explicit page break. I tested both forms that the report might mean:
an actual U+202F character: "5\u202fseconds"
the six literal characters: r"5\u202fseconds"
After rendering, both output packages reopened successfully with python-docx; both retained all three paragraphs (value, page-break paragraph, second-page marker), and the marker remained in word/document.xml. The outputs were 36,683 and 36,681 bytes respectively. I did not render them through Microsoft Word, so this does not rule out a layout interaction in the original template.
Could you attach a minimal source template plus the broken rendered output, and show repr(the_value_passed_to_render)? That would distinguish an actual U+202F code point from an escaped string and let us test the specific page/section XML that disappears.
OpenAI Codex assisted with the reproduction script and package inspection; I verified the run and results before posting.
Activity
CAOShurong commentedon Aug 13, 2026
I could not reproduce this yet against a wheel built from current
master(1f143fbe86c19ecb28c3205d5f4b1547c7e2d7ad).I created a two-page DOCX template with the value on page 1 and a fixed
SECOND_PAGE_MARKERafter an explicit page break. I tested both forms that the report might mean:"5\u202fseconds"r"5\u202fseconds"After rendering, both output packages reopened successfully with
python-docx; both retained all three paragraphs (value, page-break paragraph, second-page marker), and the marker remained inword/document.xml. The outputs were 36,683 and 36,681 bytes respectively. I did not render them through Microsoft Word, so this does not rule out a layout interaction in the original template.Could you attach a minimal source template plus the broken rendered output, and show
repr(the_value_passed_to_render)? That would distinguish an actual U+202F code point from an escaped string and let us test the specific page/section XML that disappears.OpenAI Codex assisted with the reproduction script and package inspection; I verified the run and results before posting.