Fix: Support non-ASCII (Cyrillic/Extended) characters in LocalizationHandler for English (base in Kyber) client#20
Conversation
MagixGames
left a comment
There was a problem hiding this comment.
There are a lot of issues present in this PR. You do a lot of c-style casts, don't put open brackets on a newline, don't use the game's memory arenas, and various other things in STANDARDS.md. Please fix them along with the specific comments in the code I left.
|
I have updated the code to follow the standards: used FB_GLOBAL_ARENA, replaced C-style casts, and fixed formatting. I hope everything is correct now! |
|
@MagixGames Hi again! |
|
I don't know if I'm doing the right thing by accepting these mergers |

This PR addresses the long-standing issue where custom localization strings containing non-ASCII characters (Cyrillic, Polish, Turkish, etc.) are not rendered or are rendered incorrectly when the game is running on the English Frostbite engine client.
Title:
Fix: Localization rendering and "Character not supported" errors on English clientDescription:
This PR completely rewrites the
LocalizationHandlerto fix issues with non-ASCII characters (Cyrillic, etc.) that caused invisible text and "Character not supported" warnings in the Kyber logs.Key Fixes & Improvements:
Dynamic Histogram Injection:
UITextDatabasehistogram. This allows for full support of any language on any game region.Frostbite English Client Workaround (Offset -2):
0x80and0x81in the character table.130and applies a-2byte correction during encoding. This bypasses the engine's "blind spot" and ensures characters render correctly.Performance Optimization:
std::findloop (which was $O(N^2)$) with astd::maplookup. This prevents micro-stutters and long loading times when mods have large localization files.Robustness:
Linked Issue:
Fixes https://feedback.kyber.gg/p/kyber-does-not-support-cyrillic-characters-in-mods
Testing:
Verified on the English client with Cyrillic characters. Text now renders perfectly with the correct glyphs.
After:
Before: