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

Fix hmt encoding #34

Merged
merged 5 commits into from
Apr 29, 2020
Merged

Fix hmt encoding #34

merged 5 commits into from
Apr 29, 2020

Conversation

ShellyHerself
Copy link
Member

Reported issue:

    Could not load hmt file.
Creating hud_message_text from this hmt file:
    C:\Users\kianh\OneDrive\Documents\camo_function.hmt
    WARNING: Message name on line 1 is too long. Truncating name to '扯彪慣潭敲档牡楧杮㴠䌠浡敲档牡楧杮⸮മ漊橢损浡牯慥祤㴠䌠浡'
    ERROR: No name or message on line 1

@ShellyHerself
Copy link
Member Author

Going to update this a little more

@ShellyHerself
Copy link
Member Author

Okay. I am confident of this now. The detection library that I have put in place for this is known to detect 97.25% of human readable files correctly. The only place I've seen it struggle is code files that are specifically utf-16.

So, as a fallback, whenever it can't detect what encoding something is, it picks utf-16 as that is what the expected format for these files was in the first place.

@ShellyHerself
Copy link
Member Author

I am not pulling this library in for just this btw. There is some other stuff with string encoding that I want to improve later on. Like how the string list importer creates either a unicode stringlist or ascii stringlist based on the guessed file encoding while these two tag types are not at all interchangable.

I will later on be separating those two functions in Mozzarilla so that people can pick exactly what they need.

Lower the bar of entry you could say.

@ShellyHerself ShellyHerself merged commit b18e984 into master Apr 29, 2020
@ShellyHerself ShellyHerself deleted the fix-hmt-encoding branch April 29, 2020 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant