Aug-17-2022, 08:11 PM
Hi,
I have a report that contains a lot of Mac machine names. Users seem to love apostrophes in the name.
I am getting this in my csv
administrator′s Mac
It should read
administrator’s Mac
This is my code. What can I do about that?
I have a report that contains a lot of Mac machine names. Users seem to love apostrophes in the name.
I am getting this in my csv
administrator′s Mac
It should read
administrator’s Mac
This is my code. What can I do about that?
with open(full_report_path, 'w') as f: writer = csv.writer(f) writer.writerow(['High alerts found', len(list_of_high_alerts)]) writer.writerow(['Medium alerts found', len(list_of_medium_alerts)]) writer.writerow(report_column_names) # Sets the column order with open(full_report_path, 'a+', encoding='utf-8', newline='') as output_file: dict_writer = csv.DictWriter(output_file, report_column_order) dict_writer.writerows(computer_list)In some cases users are using emoji for names. One machine is an ⚓️. I doubt there is much I can do about those ones!!