in reply to Re: Convert ASCII string to 7-bit binary string
in thread Convert ASCII string to 7-bit binary string

why do you reverse?
  • Comment on Re^2: Convert ASCII string to 7-bit binary string

Replies are listed 'Best First'.
Re^3: Convert ASCII string to 7-bit binary string
by AnomalousMonk (Archbishop) on Oct 31, 2015 at 10:52 UTC

    Because the  b7 unpack template that drops the most significant bit of the converted character also produces the binary digits in little-endian order. The OPer wants them in big-endian (i.e., most significant binary digit on the left) order, hence the 7-character sub-string must be reversed before being appended to the  $out string. Try it without reverse and see what you get.


    Give a man a fish:  <%-{-{-{-<