Skip to content

Support Cyrillic text in Notes with UTF-8-safe editing - #10452

Draft
labaznov wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
labaznov:cyrillic-notes
Draft

labaznov wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
labaznov:cyrillic-notes

Conversation

@labaznov

@labaznov labaznov commented Nov 13, 2026 •

Copy link
Copy Markdown

Pasting Russian into Notes currently replaces each non-ASCII byte with ?. Even when UTF-8 text is loaded, Backspace/Delete and double-click selection can split a character. This enables UTF-8 paste for Notes, makes deletion/word selection follow character boundaries, and adds Cyrillic glyphs to Liberation Sans while retaining all original ASCII glyph metrics and pixels.

The change keeps skills, items, game data and the interface in English. Other edit controls retain the existing paste sanitization. The font addition covers U+0400–U+04FF and the note punctuation U+00AB/U+00BB/U+2013/U+2014/U+2122; other missing glyphs retain the engine's placeholder behavior. Double-clicking whitespace immediately after a multibyte character steps over the complete previous character.

This is a coordinated draft, dependent on SimpleGraphic PR #122 for UTF-8 input and GLYPH_U32 rendering. No locally compiled DLL is committed here. Assets were generated with FontGenerator PR #3; reproduction and font licensing are included beside the assets.

Validation:

  • busted --lua=luajit equivalent using local Busted 2.2.0 / LuaJIT on Windows: 689 successes, 1 existing failure, 0 errors. Before these changes: 666 successes and the same failure.
  • Existing failure: TestRareLike_spec.lua:84, “only offers attainable modifiers on That Which Was Taken”, expected level 48 but received nil. The unmodified upstream revision has the same CI failure. The test remains enabled and is unrelated to this change.
  • All 23 editing regressions pass: mixed-language/color/link paste, selection replacement, UTF-8 deletion and word deletion, undo/redo, cursor movement, double-click word selection and XML save/load. The six new whitespace/newline/punctuation cases reproduced the reported invalid UTF-8 exception before the two caret-step corrections.
  • A local integration replay double-clicked all 44,739 character positions in a 67,306-byte translated note without invalid selections or text changes; reverting the caret fix reproduces the exception at byte 17.
  • The actual renderer passes 1,345 font/color/cursor checks, including all five punctuation glyphs at 16 heights. The old fonts fail 240 of these checks. Original ASCII and Cyrillic metadata and atlas pixels are preserved.
  • CSpell with the upstream dictionaries: 2 Lua files changed in the follow-up, 0 issues. git diff --check: exit 0.
  • The corrected single-executable development package passed 8 launcher and 2 artifact tests, then opened a responding PoB window after relocation. Existing build files and installed settings were unchanged.

The draft status reflects the cross-repository runtime dependency and pending maintainer review, not a claim of upstream acceptance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant