def encode(options={})
      encoded_values = values.collect {|v| v && v.encode('ISO8859-1')}
      encoded_values = discard_unsupported_attributes(encoded_values, options) if options[:version]
      content = CSV.generate_line(encoded_values, force_quotes: true, row_sep: '') + ","
      checksum = content.checksum
      # Complete string is content + checksum (in double quotes) + carriage return + line feed
      return (content + checksum.to_s.wrap + "\r\n").encode('ISO8859-1')
    end
def encode(options={})
      encoded_values = values.collect {|v| v && v.encode('ISO8859-1')}
      encoded_values = discard_unsupported_attributes(encoded_values, options) if options[:version]
      content = CSV.generate_line(encoded_values, force_quotes: true, row_sep: '') + ","
      checksum = content.checksum
      # Complete string is content + checksum (in double quotes) + carriage return + line feed
      return (content + checksum.to_s.wrap + "\r\n").encode('ISO8859-1')
    end
Encodes a string from the contents of this instance.

 This produces the full record string line, including a computed CRC checksum.

 @param [Hash] options an optional hash parameter
 @option options [Float] :version the Mosaiq compatibility version number (e.g. 2.4) used for the output
 @return [String] a proper RTPConnect type CSV string