Repository navigation
refactor: centralize UTF operations behind string utilities - #1175
Merged
Merged
Conversation
andiwand
force-pushed
the
review/156-pdf-identity-code-width
branch
from
October 6, 2026 19:40
86ea6f2 to
e3a5800
Compare
Main gained two utfcpp calls after this branch was cut: the bullet check in the OOXML list, which no longer built once this change dropped the include, and the font-name repair in the SFNT transform. Both use is_valid_utf8 and replace_invalid_utf8 now, so only string_util.cpp includes utfcpp, as AGENTS.md states. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MxyTMutqSUJRGfxA8CyzMc
andiwand
force-pushed
the
review/157-utf-api-boundary
branch
from
October 6, 2026 19:56
ecfc159 to
3581f3b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Finish the UTF dependency boundary: only
string_util.cppincludes or calls utfcpp. Transcoding reusesappend_c32; iWork validation, UTF-8 repair, OOXML bullets, SFNT font names, SVM advances and PDF iteration use the shared string utilities. The iterator consumes a string view only after decoding a complete code point, and the PDF reader no longer uses unchecked iteration.One focused test covers consumption, embedded NULs, multibyte characters, malformed input and empty views. Existing transcoding and format tests cover the migrated callers. No public API or expected rendering changes.
Validation: all 292 targeted tests passed, including 50 PDF corpus cases; all 1,158 PDF HTML outputs remain byte-identical to the parent. Full local library/CLI clang-tidy and clang-format 18 checks passed.