ManageIQ/manageiq — pull request #715 by jrafanie (2014-09-25 19:43:36+00:00)
Title: Force a binary string literal as binary for ruby 2.0+.

See #218 #465 #589

Ruby 2.0 reads Strings in ruby scripts by default as UTF-8 unless you specify a magic comment #coding or force the encoding.

Binary string literals, if they can't be converted to UTF-8, will not be equivalent to their binary string counterparts:

"\222dL\256".force_encoding("ASCII-8BIT") == "\222dL\256".force_encoding("UTF-8")
=> false

Whereas, compatible conversions will be equivalent:
"\001\002".force_encoding("ASCII-8BIT") == "\001\002".force_encoding("UTF-8")
=> true