diff --git a/csv_metadata_quality/app.py b/csv_metadata_quality/app.py index 7c1c7cf..3c60296 100644 --- a/csv_metadata_quality/app.py +++ b/csv_metadata_quality/app.py @@ -109,12 +109,11 @@ def run(argv): # Check: suspicious characters df[column].apply(check.suspicious_characters, field_name=column) - # Check: mojibake - df[column].apply(check.mojibake, field_name=column) - - # Fix: mojibake + # Fix: mojibake. If unsafe fixes are not enabled then we only check. if args.unsafe_fixes: df[column] = df[column].apply(fix.mojibake, field_name=column) + else: + df[column].apply(check.mojibake, field_name=column) # Fix: invalid and unnecessary multi-value separators df[column] = df[column].apply(fix.separators, field_name=column)