Place: Word .doc text with a broken surrogate pair is refused, and fields without a result warn

A 16-bit piece holding half of a UTF-16 surrogate pair was placed with
U+FFFD in its place; the document is now refused. A pair split between
two pieces is decoded as one character.

A field with no result (no separator, never ended, or nested past 64)
is left out with its own warning, and the warning about fields placed
as their results is given only for fields that have one.
This commit is contained in:
dotCooCoo
2026-11-01 07:16:30 +07:00
committed by bflatastic
parent 5fdccdf602
commit 8805fa8214
4 changed files with 67 additions and 31 deletions
+5 -4
View File
@@ -3838,10 +3838,11 @@ font, the paragraph style and the character style (and the styles each is based
text is read; table cells are separated by tabs and each row is a paragraph, and a field places as its result. Hidden
and deleted text, field instructions, pictures and embedded objects, headers, footers, notes, comments and text boxes
are left out, and `warnings` names each kind of content left out or changed once (pictures and objects, fields,
tracked changes, tables, and the other stories the document has). Documents saved by Word 6.0 or Word 95, encrypted or
password-protected documents and documents last saved with fast save are refused, and so are a stream larger than
64 MiB, a document with more than 4 MiB of text, 100,000 pieces, 16,384 pages of properties or 100,000 paragraphs or
runs, and one whose structures lie outside their streams.
tracked changes, tables, and the other stories the document has); a field with no result is left out with its own
warning. Documents saved by Word 6.0 or Word 95, encrypted or password-protected documents and documents last saved with
fast save are refused, and so are a stream larger than 64 MiB, a document with more than 4 MiB of text, 100,000 pieces,
16,384 pages of properties or 100,000 paragraphs or runs, one whose 16-bit text holds half of a surrogate pair, and one
whose structures lie outside their streams.
`file.place` answers `format: "doc"`.
## PDF presets