file_to_subtitles() unicode issue #1394
Labels
bug
Issues that report (apparent) bugs.
good-first-issue
Especially suitable for people new to moviepy and/or programming; beginner-friendly.
Not sure if this is a bug or feature request:
I was trying to create a SubtitlesClip() from a .srt file with Spanish subtitles. The special characters from the .srt did not convert properly:
([5.169, 9.06], 'a su página de inicio. Aquí encontrará todas las tareas')
was converted into:
([5.169, 9.06], 'a su página de inicio. AquÃ\xad encontrará todas las tareas')
The problem is with how the function
file_to_subtitles()
opens the srt file.
changing line 153 in subtitles.py from:
with open(filename,'r') as f:
to
with open(filename,'r',encoding="utf-8") as f:
solved the problem
The text was updated successfully, but these errors were encountered: