If an English caption export shows a broken apostrophe, start with the original bytes rather than deleting the visible symbol. In our one-cue Windows-1252 sample, the text was intact before it was incorrectly decoded. The repair was a known-encoding conversion, not rewriting the line by hand.
Confirm the source encoding first
This procedure assumes the export is known to be Windows-1252. Confirm that in the exporting application or with the sender. File extensions do not tell you the encoding. If the text has already been saved with replacement characters, ask for the original file: converting those replacements cannot recover the original punctuation.
The complete intended caption is:
1
00:00:01,000 --> 00:00:02,500
Alex’s microphone is ready.
Convert to a new path, and reject failures
For a terminal with iconv, use a separate temporary file. Inspect the conversion error before accepting any output. Do not redirect back onto the source and do not add -c to force success. Our wrong-encoding test created partial output before failing.
iconv -f WINDOWS-1252 -t UTF-8 legacy.srt > captions-utf8.tmp
Only after status 0 should you inspect that file and rename it to your final delivery filename. To avoid managing partial command output yourself, this Python 3 alternative decodes completely before writing and refuses to overwrite an existing destination:
from pathlib import Path
source = Path("legacy.srt")
destination = Path("captions-utf8.srt")
text = source.read_bytes().decode("cp1252", errors="strict")
with destination.open("xb") as output:
output.write(text.encode("utf-8"))
Save the code as a script and run it from the folder containing legacy.srt. Python’s cp1252 name denotes Windows-1252. The exclusive xb mode prevents accidental replacement. File permission, disk or encoding errors still need attention; this is not a backup system.
Check the text and times separately
Open the UTF-8 result using an explicit UTF-8 setting. Confirm “Alex’s”, both timestamps, the cue number and the final newline. Our sample changed from 60 to 62 bytes because the apostrophe’s representation expanded, while the visible intended text stayed the same.
For this known source we also converted back to Windows-1252 and compared the bytes. That matched exactly. A round trip is a useful check when the source encoding is established, but it cannot prove that an initial encoding guess was correct.
Next, run a syntax/timing check and preview the cue against the video. Encoding repair does not fix timing. Our SRT timing guide includes a local checker for ordinary UTF-8 SRT.
Stop when the problem is not this one
A file mixing multiple encodings, an image of captions or text already containing literal replacement characters needs a different investigation. This guide does not detect encodings automatically, perform OCR or reconstruct missing bytes. If the original is already valid UTF-8, do not run it through a Windows-1252 conversion.
We tested the explicit conversion, wrong-source failure and discarded-character outcome locally; the Python alternative was also checked against the same bytes. Small synthetic English fixture only, no browser upload or large-file tests. Read the iconv test report, Python codec documentation and software profile for scope and limitations.