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

Convert iso-8859-1 encoded files to UTF8 encoding #145

Closed
wants to merge 1 commit into from

Conversation

GravisZro
Copy link
Contributor

@GravisZro GravisZro commented Apr 22, 2024

The following script was used convert the file encodings.

for filename in $(find)
do
  encoding=$(file -b --mime-encoding $filename)
  if [ "$encoding" = "iso-8859-1" ]; then
    iconv -f iso-8859-1 -t utf8 ${filename} -o ${filename}.utf8
    mv ${filename}.utf8 ${filename}
  fi
done

@GravisZro GravisZro marked this pull request as draft April 22, 2024 04:03
@GravisZro GravisZro marked this pull request as ready for review April 22, 2024 04:21
@winterheart
Copy link
Collaborator

Converting non-English messages may break them in game. Need test it on runtime.

@@ -138,15 +138,15 @@ const char *French_strings[] = {
"Votre processeur et votre systFme doivent prendre en charge Katmai pour exTcuter ce jeu."};

const char *German_strings[] = {
"Descent3 unter Windows NT ben�tigt fnr die Ausfnhrung die NT-Version 4.0 oder h�her",
"Descent 3 ben�tigt fnr die Ausfnhrung Windows 9x, NT 4.0 oder h�her.",
"Descent3 unter Windows NT ben÷tigt fnr die Ausfnhrung die NT-Version 4.0 oder h÷her",

Choose a reason for hiding this comment

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

The German umlauts are still looking wonky.

Copy link
Contributor

@Jayman2000 Jayman2000 left a comment

Choose a reason for hiding this comment

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

  • I recommend putting fixes #145 into the description of this pull request so that that issue automatically gets closed when this PR is merged.
  • I think that you should split this change into two different commits, one that converts things to UTF-8, and one that switches to LF line endings. We may find a bug in the future that is caused by switching to UTF-8, but not caused by switching to LFs. If we do end up finding such a bug, it will be easier to use git-bisect to figure out what’s going on if these two big changes are in separate commits.

Descent3/macmain.cpp Show resolved Hide resolved
The following script was used convert the file encodings.
```
for filename in $(find)
do
  encoding=$(file -b --mime-encoding $filename)
  if [ "$encoding" = "iso-8859-1" ]; then
    iconv -f iso-8859-1 -t utf8 ${filename} -o ${filename}.utf8
    mv ${filename}.utf8 ${filename}
  fi
done
```
@JeodC
Copy link
Collaborator

JeodC commented Apr 22, 2024

  • I recommend putting fixes #145 into the description of this pull request so that that issue automatically gets closed when this PR is merged.
  • I think that you should split this change into two different commits, one that converts things to UTF-8, and one that switches to LF line endings. We may find a bug in the future that is caused by switching to UTF-8, but not caused by switching to LFs. If we do end up finding such a bug, it will be easier to use git-bisect to figure out what’s going on if these two big changes are in separate commits.

Do you mean #129?

@GravisZro
Copy link
Contributor Author

Converting non-English messages may break them in game. Need test it on runtime.

@winterheart How can I start D3 in a specific language?

@JeodC
Copy link
Collaborator

JeodC commented Apr 22, 2024

Converting non-English messages may break them in game. Need test it on runtime.

@winterheart How can I start D3 in a specific language?

I think it uses your system language.

@Jayman2000
Copy link
Contributor

  • I recommend putting fixes #145 into the description of this pull request so that that issue automatically gets closed when this PR is merged.
  • I think that you should split this change into two different commits, one that converts things to UTF-8, and one that switches to LF line endings. We may find a bug in the future that is caused by switching to UTF-8, but not caused by switching to LFs. If we do end up finding such a bug, it will be easier to use git-bisect to figure out what’s going on if these two big changes are in separate commits.

Do you mean #129?

Yes.

@GravisZro GravisZro closed this Apr 24, 2024
@GravisZro GravisZro deleted the fix/encoding branch April 24, 2024 23:32
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.

None yet

5 participants