Skip to content

Backport i18n script#393

Merged
roblabla merged 2 commits intoGensokyoClub:masterfrom
xmvziron:backport-i18n
Mar 8, 2026
Merged

Backport i18n script#393
roblabla merged 2 commits intoGensokyoClub:masterfrom
xmvziron:backport-i18n

Conversation

@xmvziron
Copy link
Contributor

@xmvziron xmvziron commented Mar 3, 2026

xmvziron and others added 2 commits March 3, 2026 16:43
During the build process, the strings in i18n.tpl need to be
transformed from UTF-8 into Shift-JIS. However, it was done naively by
encoding the file contents itself into Shift-JIS. This caused an issue
where if a Shift-JIS sequence generated a `\` (0x5c) character, it would
leave that character in the string, leading to unwanted escape sequences
(raised by the compiler as warnings) and corrupt that string.

The script in this commit only tries to encode the character within the
quotation delimiters, and outputting a series of escaped hex characters
and also handles special cases such as \r and \n.
@roblabla roblabla merged commit bf73786 into GensokyoClub:master Mar 8, 2026
6 checks passed
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.

2 participants