-
Notifications
You must be signed in to change notification settings - Fork 8
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
FormatException: Encoded surrogate (at offset 12) #14
Comments
Using |
Do you have a call stack for when the exception/error got thrown? Also since it's little endian I'll assume this is a NBT file from Bedrock? In that case you should be using |
i don't understand your first sentence, i using setEndianness little, it
work on almost Bedrock file (end with .mcstructure) but the file i note in
this thread doesn't work. Visual code plugin still can read it so i think
the problem is this package.
Vào CN, 29 thg 9, 2024 lúc 03:57 sean ***@***.***> đã viết:
… Do you have a call stack for when the exception/error got thrown? Also
since it's little endian I'll assume this is a NBT file from Bedrock? In
that case you should be using setEndianness = Endian.little since most
modern computers use big endianness.
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APDWGXVAK7ZE63AT3JLPBKTZY4J5PAVCNFSM6AAAAABO63J5L6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQHA4TGMBTHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please check this nbt file
minecraft_building.zip
When i using visual code to read, it all fine. The endianness is little.
But the code below return the error: FormatException: Encoded surrogate (at offset 12)
var result = await FilePicker.platform.pickFiles(allowMultiple: false); File f = File(result!.files.first.path!); final nbtReader = NbtReader.fromFile(f.path); nbtReader.setEndianness = Endian.little; nbtReader.read(); NbtCompound rootNode = nbtReader.root!;
The text was updated successfully, but these errors were encountered: