Traditional Chinese subtitles become garbled after uploading
lzkdev opened this issue · comments
Hello,
I'm experiencing a garbled text issue when trying to upload a Traditional Chinese subtitle file encoded in UTF-8 to Storage. The subtitle file looks perfectly fine when viewed locally, but the Chinese characters become garbled after uploading and viewing it on your platform.
Here's the code I'm using for uploading the file:
file_options = {"content-type": "text/vtt; charset=utf-8"} storage_client.get_bucket("subtitles").upload(f"filename.vtt", path, file_options=file_options)
Here's the uploaded file
and the origin file:
HgI39JSX0cA.zh.vtt.txt
I have already confirmed the following:
The local subtitle file is indeed encoded in UTF-8.
The encoding specified in file_options is also UTF-8.
Can you please help me resolve this issue? If you need more information, let me know and I will provide it as soon as possible.
Thank you!
Hm I've attempted to replicate by directly uploading and can achieve the same result. Let me check with the team
Closing this issue as it seems to be upstream, let's continue discussion here: supabase/storage#366