Repository navigation
Studio: preserve Unicode across continued XLS strings - #16713
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
When an emoji or rare CJK character in an None of the 874 real I pushed b277cfe so a corrupt file with a record ending mid-character gets one replacement character, as on main, instead of garbling the rest of the string. Mirror CI is clear at d8fac12, before that commit; the one failure is the |
What was broken
Binary XLS cell text can lose supplementary Unicode characters during RAG parsing. Emoji and CJK names become replacement characters when a UTF-16 surrogate pair crosses a BIFF CONTINUE record. The damaged text is then stored and indexed, so searches for the original name can miss it.
Repro
91be10960, use xlwt 1.3.0 to write'A' * 4105 + '\U0001f600tail'into the first cell of an.xlsworkbook.office_formats.xls, or upload it for RAG indexing.Fix
Keep single-fragment strings on the direct decode path. For continued strings, normalize compressed fragments to UTF-16LE bytes and decode the joined stream once. This preserves pairs across record boundaries while retaining width changes, metadata skipping, replacement of malformed Unicode, and the returned record position.
This fixes both shared strings and cached formula results. It does not change XLSX parsing.
Test
Ten regression cases fail before the fix; all 18 selected cases pass afterward. Coverage includes shared and formula strings, emoji and CJK characters, compressed/wide transitions, full 8KB record boundaries, formatting metadata, malformed surrogates, and separate-string boundaries. Upload-to-FTS tests verify that a split CJK surname remains searchable, with stub embeddings and real ingestion/SQLite.
From
studio/backend:The skip is the opt-in real-embedder test. Separately verified xlwt-produced workbooks at all three prefix lengths. The broken case now round-trips exactly, and the controls are unchanged. Local ASCII/BMP single-fragment microbenchmarks show no regression.
All seven repository checks and the pinned pre-commit formatter pass. No schema or dependency changes.