def utf_filter(utf)
      return unless utf.present?
      # puts utf.inspect
      utf_status = utf.except(:text).compact.keys
      utf_status = utf_status&.map(&:to_s)&.join(', ')
      utf_status = 'perfect' if utf_status.blank?

      encoded = utf[:text] if utf[:encoded]
      error = utf[:error]
      line = utf.except(:error).compact.values.last unless error
      data_hash = { row_id: @row_id, utf_status: utf_status }

      @encoded_rows << { row_id: @row_id, text: encoded } if encoded
      @error_rows << { row_id: @row_id, text: error } if error
      @defective_rows << filt_utf_hsh[:text] if error
      @data_hash = data_hash if @data_hash[:row_id] != @row_id
      line
    end
def utf_filter(utf)
      return unless utf.present?
      # puts utf.inspect
      utf_status = utf.except(:text).compact.keys
      utf_status = utf_status&.map(&:to_s)&.join(', ')
      utf_status = 'perfect' if utf_status.blank?

      encoded = utf[:text] if utf[:encoded]
      error = utf[:error]
      line = utf.except(:error).compact.values.last unless error
      data_hash = { row_id: @row_id, utf_status: utf_status }

      @encoded_rows << { row_id: @row_id, text: encoded } if encoded
      @error_rows << { row_id: @row_id, text: error } if error
      @defective_rows << filt_utf_hsh[:text] if error
      @data_hash = data_hash if @data_hash[:row_id] != @row_id
      line
    end
* UTF FILTER *