cheahjs / palworld-save-tools

Tools for converting Palworld .sav files to JSON and back
MIT License
767 stars 65 forks source link

error decoding sav to json #87

Open xczsonn opened 5 months ago

xczsonn commented 5 months ago

Common issues before reporting

Have you modified the save files If you have, please ensure that the JSON files are valid.

Have you tried the latest release Please download the palworld-save-tools-windows.zip file from releases in case it's been fixed.

Describe the bug A clear and concise description of what the bug is.

Copy of .sav or .sav.json files If possible, attach the .sav or .sav.json file. Add to a zip file to compress it down from gigabytes down to megabytes to make it manageable.

Error decoding utf-16-le string of length 9, data loss may occur! b'W\x00i\x00l\x00l\x00i\x00a\x00m\x00=\xd8'

image

why this happen?

sav file https://gofile.io/d/m9KkWg

cheahjs commented 5 months ago

This should be fine, there are some characters that Python doesn't encode/decode without errors, but tests show that it should not impact anything. I print a warning just in case (and it's likely to pose compatibility problems with other tools that read this tool's JSON output if they don't handle it correctly).