Skip to content

lcftrans: preserve DEL (0x7F) in extracted msgid#107

Open
lucasmachine wants to merge 1 commit intoEasyRPG:masterfrom
lucasmachine:fix/lcftrans-preserve-del-msgid
Open

lcftrans: preserve DEL (0x7F) in extracted msgid#107
lucasmachine wants to merge 1 commit intoEasyRPG:masterfrom
lucasmachine:fix/lcftrans-preserve-del-msgid

Conversation

@lucasmachine
Copy link

Problem

Some translated strings are not applied because the extracted msgid is missing a leading byte that exists in the game data.

This was reproduced with the RPG Maker 2000/2003 game 水たまりの彼女.
In affected event messages, a leading DEL (0x7F) byte is present in map data, but was removed during extraction, so EasyRPG Player could not match the translation and fell back to original Japanese text.

Root Cause

Utils::RemoveControlChars removed both:

  • C0 control bytes (0x00-0x1F)
  • DEL (0x7F)

For this game, DEL (0x7F) is meaningful as a message prefix, so removing it causes msgid mismatch.

Fix

Keep DEL (0x7F) in extracted strings, while still removing C0 control bytes (0x00-0x1F).

Scope

  • No CLI changes
  • No API changes
  • Minimal behavior change in extraction normalization only

Changed File

  • lcftrans/src/utils.cpp
    • Utils::RemoveControlChars: stop removing 0x7F, continue removing 0x00-0x1F
    • updated comment to clarify behavior

Verification

  • Reproduced against 水たまりの彼女
  • Confirmed affected extracted msgid now keeps the leading DEL byte
  • Confirmed translations are now correctly applied in EasyRPG Player for those lines

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant