We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, I'm decoding forward payload data but I'm getting extra characters in the decoded string:
const base64String = 'te6cckEBAQEAEQAAHgAAAABIZWxsbywgVE9OIb7WCx4='; const decodedBase64 = TonWeb.utils.base64ToBytes(base64String); const decodedString = new TextDecoder().decode(decodedBase64); console.log(decodedString); // ��rAHello, TON! ��
Can anyone help me understand why extra characters are appearing in the decoded string and how to fix this issue?
The text was updated successfully, but these errors were encountered:
Because the string is boc you need to parse it by cell and pass the opcode by slice.loadUint(32)
boc
slice.loadUint(32)
const base64String = 'te6cckEBAQEAEQAAHgAAAABIZWxsbywgVE9OIb7WCx4='; const cell = Cell.fromBase64(base64String); console.log(cell) // x{0000000048656C6C6F2C20544F4E21} const slice = cell.beginParse() slice.loadUint(32) console.log(slice.loadStringTail()); // Hello, TON!
Sorry, something went wrong.
No branches or pull requests
Hi, I'm decoding forward payload data but I'm getting extra characters in the decoded string:
Can anyone help me understand why extra characters are appearing in the decoded string and how to fix this issue?
The text was updated successfully, but these errors were encountered: