14

I would like to add strings into bytes32. What is the maximum number of letters bytes32 can have?

1 Answer 1

22

Each bytes32 can store up to 32 letters (ASCII): each character is a byte.

2
  • 1
    How about UTF-8? Commented Jul 1, 2016 at 13:36
  • 2
    Same answer 32: the first 128 characters of UTF-8 correspond one-to-one with ASCII, which is where the usual letters and numbers are.
    – eth
    Commented Jul 1, 2016 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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