[GH-ISSUE #2534] [Issue]: Game Mode: non-Latin speaker names (e.g. Japanese) show the silhouette avatar and no full-body sprite #1259

Closed
opened 2026-10-21 05:30:05 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Lemon-will on GitHub (Jun 9, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2534

Originally assigned to: @SpicyMarinara on GitHub.

Summary

In Game Mode, characters whose names are written in non-Latin scripts (Japanese hiragana/katakana/kanji, Cyrillic, etc.) never resolve their message-window avatar or full-body sprite; the avatar falls back to the default npc-silhouette.

Expected behavior

Speaker-name matching should work for names in any script, so the dialogue-window avatar and the full-body sprite resolve for non-Latin-named characters, the same as they do for Latin-named ones.

Actual behavior

The message-window avatar shows the default silhouette and no full-body sprite appears — even though the same character's round icon (top-left) shows the correct image. Only the dialogue UI is affected, because party-bar/sidebar avatars use the avatar URL directly without name matching.

Steps to reproduce

  1. Create/use a character whose name is non-Latin (e.g. katakana ナミ, or hiragana さくら), give it an avatar and a full_* sprite.
  2. Start Game Mode and have that character speak.
  3. Observe: the message-window avatar is the silhouette and no full-body sprite renders, while the top-left round icon for the same character is correct.

Environment

  • Marinara Engine version: 1.6.1
  • Install type: source (git-based launcher)
  • OS + version: Windows 11 Home (build 26200)
  • Browser or app shell: Google Chrome 148.0.7778.218

Logs, screenshots, or video

N/A

Additional context

Root cause: normalizeCharacterName in packages/client/src/lib/game-character-name-match.ts normalizes with [^a-z0-9], which strips all non-Latin characters. Non-Latin names collapse to an empty string, so findNamedEntry early-returns and findNamedMapValue(speakerAvatarInfos, speaker) never matches. That single failure produces both symptoms (silhouette avatar + unset activeSpeaker, which blocks full-body sprite resolution).

Fix prepared on a branch (fix/game-character-name-match-cjk): normalize with [^\p{L}\p{N}\p{M}]+ and the u flag, keeping letters/numbers/combining marks from any script; Latin behavior unchanged. Verified in a local production build (katakana-named character now shows its avatar and full-body sprite). PR to follow.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Lemon-will on GitHub (Jun 9, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2534 Originally assigned to: @SpicyMarinara on GitHub. ## Summary In Game Mode, characters whose names are written in non-Latin scripts (Japanese hiragana/katakana/kanji, Cyrillic, etc.) never resolve their message-window avatar or full-body sprite; the avatar falls back to the default `npc-silhouette`. ## Expected behavior Speaker-name matching should work for names in any script, so the dialogue-window avatar and the full-body sprite resolve for non-Latin-named characters, the same as they do for Latin-named ones. ## Actual behavior The message-window avatar shows the default silhouette and no full-body sprite appears — even though the same character's round icon (top-left) shows the correct image. Only the dialogue UI is affected, because party-bar/sidebar avatars use the avatar URL directly without name matching. ## Steps to reproduce 1. Create/use a character whose name is non-Latin (e.g. katakana `ナミ`, or hiragana `さくら`), give it an avatar and a `full_*` sprite. 2. Start Game Mode and have that character speak. 3. Observe: the message-window avatar is the silhouette and no full-body sprite renders, while the top-left round icon for the same character is correct. ## Environment - Marinara Engine version: 1.6.1 - Install type: source (git-based launcher) - OS + version: Windows 11 Home (build 26200) - Browser or app shell: Google Chrome 148.0.7778.218 ## Logs, screenshots, or video N/A ## Additional context Root cause: `normalizeCharacterName` in `packages/client/src/lib/game-character-name-match.ts` normalizes with `[^a-z0-9]`, which strips all non-Latin characters. Non-Latin names collapse to an empty string, so `findNamedEntry` early-returns and `findNamedMapValue(speakerAvatarInfos, speaker)` never matches. That single failure produces both symptoms (silhouette avatar + unset `activeSpeaker`, which blocks full-body sprite resolution). Fix prepared on a branch (`fix/game-character-name-match-cjk`): normalize with `[^\p{L}\p{N}\p{M}]+` and the `u` flag, keeping letters/numbers/combining marks from any script; Latin behavior unchanged. Verified in a local production build (katakana-named character now shows its avatar and full-body sprite). PR to follow. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:30:05 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Jun 10, 2026):

Thank you for the report and for the PR! Amazing work!

<!-- gh-comment-id:4667741098 --> @SpicyMarinara commented on GitHub (Jun 10, 2026): Thank you for the report and for the PR! Amazing work!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1259
No description provided.