def compile_results
      utf_status = @valid_rows.map { |hsh| hsh[:utf_status] }
      mapped_details = utf_status.map { |str| str.split(', ') }.flatten.compact
      groups = make_groups_from_array(mapped_details)
      wchar = groups['wchar']
      perfect = groups['perfect']

      header_row_count = @headers.any? ? 1 : 0

      utf_result = {
        stats: { total_rows: @row_id, header_row: header_row_count, valid_rows: @valid_rows.count, error_rows: @error_rows.count, defective_rows: @defective_rows.count, perfect_rows: perfect, encoded_rows: @encoded_rows.count, wchar_rows: wchar },
        data: { valid_data: @valid_rows, encoded_data: @encoded_rows, defective_data: @defective_rows, error_data: @error_rows }
      }
      utf_result
    end
def compile_results
      utf_status = @valid_rows.map { |hsh| hsh[:utf_status] }
      mapped_details = utf_status.map { |str| str.split(', ') }.flatten.compact
      groups = make_groups_from_array(mapped_details)
      wchar = groups['wchar']
      perfect = groups['perfect']

      header_row_count = @headers.any? ? 1 : 0

      utf_result = {
        stats: { total_rows: @row_id, header_row: header_row_count, valid_rows: @valid_rows.count, error_rows: @error_rows.count, defective_rows: @defective_rows.count, perfect_rows: perfect, encoded_rows: @encoded_rows.count, wchar_rows: wchar },
        data: { valid_data: @valid_rows, encoded_data: @encoded_rows, defective_data: @defective_rows, error_data: @error_rows }
      }
      utf_result
    end
* COMPILE RESULTS *