Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encodings #423

Merged
merged 3 commits into from
Jan 28, 2021
Merged

Encodings #423

merged 3 commits into from
Jan 28, 2021

Conversation

Tiax
Copy link
Contributor

@Tiax Tiax commented Jan 16, 2021

Attempt to resolve #155

@Tiax Tiax requested a review from nsKpz as a code owner January 16, 2021 13:34
@Faalagorn
Copy link
Contributor

You beat me to it, but at least I got the time to clean up and properly set up my local repo :). I'll test it in a minute

@Faalagorn
Copy link
Contributor

It seems to work just fine for me:
screenshot_2021-01-16-151229

@nsKpz nsKpz merged commit 44f407e into TheIndieStone:master Jan 28, 2021
@nsKpz
Copy link
Contributor

nsKpz commented Jan 28, 2021

Fantastic, thank you

Copy link
Contributor

@Mishasama Mishasama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remind: The CN/credits.txt is using GB2312... not the UTF-8...😂

@nsKpz
Copy link
Contributor

nsKpz commented Jan 28, 2021

@Mishasama This is a change to make them show up correctly on Github. The encoding of the game files will remain. :)

@Tiax
Copy link
Contributor Author

Tiax commented Jan 29, 2021

Is that file read by the game expecting that encoding? I assumed that's just an info file, so they're all exported as unicode, right now.

This was the state before any encoding changes:

$ git log -1
commit 26ec9cea9299f33d32f0dfae8dd0960313882387 (HEAD)
Author: nsKpz <martinnasko@gmail.com>
Date:   Thu Jan 14 15:28:29 2021 +0100

    Update credits.txt

    Removed links until all references to the QQ group are removed from said sites.

$ file -i */credits.txt
AF/credits.txt:   text/plain; charset=us-ascii
AR/credits.txt:   text/plain; charset=us-ascii
CH/credits.txt:   text/plain; charset=us-ascii
CN/credits.txt:   text/plain; charset=unknown-8bit
CS/credits.txt:   text/plain; charset=us-ascii
DA/credits.txt:   text/plain; charset=us-ascii
DE/credits.txt:   text/plain; charset=us-ascii
EE/credits.txt:   inode/x-empty; charset=binary
ES/credits.txt:   text/plain; charset=us-ascii
FR/credits.txt:   text/plain; charset=us-ascii
HU/credits.txt:   text/plain; charset=us-ascii
IT/credits.txt:   text/plain; charset=us-ascii
JP/credits.txt:   text/plain; charset=us-ascii
KO/credits.txt:   text/plain; charset=us-ascii
NL/credits.txt:   text/plain; charset=us-ascii
NO/credits.txt:   text/plain; charset=us-ascii
PL/credits.txt:   text/plain; charset=us-ascii
PT/credits.txt:   text/plain; charset=us-ascii
PTBR/credits.txt: text/plain; charset=us-ascii
RU/credits.txt:   text/plain; charset=us-ascii
TH/credits.txt:   text/plain; charset=us-ascii
TR/credits.txt:   text/plain; charset=us-ascii
UA/credits.txt:   text/plain; charset=us-ascii

If for whatever odd reason the CN credits file needs to be in that particular codepage, just add a rule to the bottom of gitattributes (later rules take precedence, as per git docs).

Faalagorn added a commit to Faalagorn/ProjectZomboidTranslations that referenced this pull request Jan 30, 2021
Updated README.md to reflect the changes fixed by TheIndieStone#423 and did some minor rewording/improvements
@Mishasama
Copy link
Contributor

@Mishasama This is a change to make them show up correctly on Github. The encoding of the game files will remain. :)

I know what is this... But I don't know how to add the rule for this file.😓

Maybe like this?

CN/credits.txt text working-tree-encoding=gb2312 encoding=utf-8

@Tiax
Copy link
Contributor Author

Tiax commented Jan 31, 2021

OK sooooo: the game reads the credits.txt to show it under the language selection (zombie.Lua.LuaManager.GlobalObject#getTranslatorCredits(Language)).

It currently does not specify an encoding for doing that, so it defaults to the system encoding (WIN1252 in my case, German windows). That means: it doesn't really matter what we encode the file in: it will always be broken on one system or another, unless that is changed.

nsKpz added a commit that referenced this pull request Mar 5, 2021
Updated README with changes from #423 + fixes
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.

encoding issue
4 participants