I have functions which are forced to return a bytes32 object, but then in my webapp I need to reconvert them to a classic string. How can I do that?


Try using the web3.js function web3.toAscii (doc), which might change name to web3.toUtf8 or something similar in the future.

| improve this answer | |

In version 1.0 of web3 js use the new utils function



| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.