What is the best way to convert a String to a ByteString in Haskell?
My gut reaction to the problem is
import qualified Data.ByteString as B
import Data.Char (ord)
packStr = B.pack . map (fromIntegral . ord)
But this doesn't seem satisfactory.