CommitteeOfZero / sc3tools

CLI tool for modifying text in MAGES. engine based games
MIT License
30 stars 12 forks source link

Robotics;Note DaSH charset.utf8 has duplicate characters within it #2

Open ItsAllAboutTheCode opened 3 years ago

ItsAllAboutTheCode commented 3 years ago

Hello, I am trying to use the sc3tools to insert re-insert text made from the CommiteeOfZero into .msb files and noticed an issue with the charset.utf8 for Robotics;Note DaSH. It has duplicate characters such as the letter 'i' and 'v' within it which is causing reinsertion to corrupt text up around the character "i". image

I ran an awk command to replace the duplicate characters with a space from the charset.utf8 file

awk '{  printme=""; for ( n=1; n<length($0); n++ ) { char=substr($0,n,1); if ( index(printme,char) == 0) printme = printme char; else printme = printme "
[charset.utf8.txt](https://github.com/CommitteeOfZero/sc3tools/files/7043676/charset.utf8.txt)
 "; }; print printme; }' resources/rnd/charset.utf8. > resources/rnd/charset.utf8.remove_dups

I found that substituting the duplicate characters with the ascii space character(0x20) resolves the issues. Here is an updated charset.utf8 file with the duplicate characters replaced with ascii space. charset.utf8

Also I noticed an issue with the replacement of text in sc3tools 2.1 and commented on it at https://github.com/CommitteeOfZero/sc3tools/commit/c0946d6de8dff627dd01e7ecfe60742f4be9dcc8#r55247130

Enorovan commented 4 months ago

Haven't yet looked into that charset issue, but thanks for the pointer for the text-replacement issue, it has been fixed for 2.2.0