force encoding to ASCII-8BIT for binary data to prevent encoding errors in ruby 1.9+