Descent3 icon indicating copy to clipboard operation
Descent3 copied to clipboard

Convert iso-8859-1 encoded files to UTF8 encoding

Open GravisZro opened this issue 10 months ago • 5 comments

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 avatar Apr 22 '24 03:04 GravisZro

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

winterheart avatar Apr 22 '24 07:04 winterheart

  • 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?

JeodC avatar Apr 22 '24 17:04 JeodC

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

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

GravisZro avatar Apr 22 '24 21:04 GravisZro

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.

JeodC avatar Apr 22 '24 21:04 JeodC

  • 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.

Jayman2000 avatar Apr 22 '24 21:04 Jayman2000