arcusmaximus / YTSubConverter

A tool for creating styled YouTube subtitles
MIT License
767 stars 55 forks source link

.ass file generation affected by locale on windows #56

Closed s0hv closed 2 years ago

s0hv commented 2 years ago

I was trying to convert .srv3 file to .ass by using the program in the command line on Windows 10. However it did not seem to work and when I opened the file the start and end times were formatted as such Dialogue: 0,0.00.05.78,0.00.09.52,... I looked around for a small while and found that my locale affected the end result for some reason. Here's how my current locale looks like image

I then changed the locale to English (Europe) and the .ass file generated correct timestamps as such Dialogue: 0,0:00:05.78,0:00:09.52,...

I don't know why locale overrides the format shown in the code writing the file. Maybe InvariantCulture needs to be used. https://github.com/arcusmaximus/YTSubConverter/blob/8e5fe4d3041d99e946e870a38602309dacca64fd/YTSubConverter.Shared/Formats/Ass/AssDocument.cs#L680

arcusmaximus commented 2 years ago

: is indeed seen as a placeholder that gets replaced by a culture-specific character (except I keep forgetting it). This will be fixed in the next release - thanks for reporting.