I like seeing answers that use both "ord" and "unpack". It brings up a question, is it a binary buffer or a buffer of text? The two methods can give different answers with Unicode. Unpack with "C" will extract values byte by byte, ord always works character by character- which could be multi-byte characters.
If you use "W" with unpack, then it will behave the same as ord.
In reply to Re^2: Binary value of string
by Yary
in thread Binary value of string
by packetstormer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |