79109266

Date: 2024-10-21 08:50:35
Score: 1
Natty:
Report link

you can try it.

def encode_filename(filename:str) -> str:
    encoded_filename = base64.b64encode(filename.encode('utf-8')).decode('utf-8')
    return f'=?utf-8?B?{encoded_filename}?='

file_name = "Avent à à écouter.pdf"
print(encode_filename(file_name))    # =?utf-8?B?QXZlbnQgw6Agw6Agw6ljb3V0ZXIucGRm?=
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: KunKun Luo