import os file_path = r'd:\骅锋\mall\pages\mall\admin\order-management.uvue' # The goal is to rewrite the file as UTF-8 without BOM with clean content content = """ """ with open(file_path, 'w', encoding='utf-8') as f: f.write(content) print(f"Successfully fixed {file_path}")