Skip to main content

Convert Charset

Conversion

Is your subtitle file not encoded in UTF-8 (or another charset you want) and causing a problem? You can use whatsub to re-encode in UTF-8 or another charset you want.

For instance, if a sub file named some-sub.smi is encoded in Windows-949 and you want to re-encode it in UTF-8, You can simply use whatsub charset convert command.

whatsub charset convert --from Windows-949 --to UTF-8 some-sub.smi some-sub-utf8.smi

Or

whatsub charset convert -f Windows-949 -t UTF-8 some-sub.smi some-sub-utf8.smi

Or

whatsub charset convert -f Windows-949 some-sub.smi some-sub-utf8.smi

If --to or -t is missing the default value is UTF-8.

All Available Charsets

Would you like to see the list charsets supported by whatsub? Just runt whatsub charset list

whatsub charset list
== List of available charsets ==
Big5
Big5-HKSCS
CESU-8
EUC-JP
EUC-KR
GB18030
GB2312
GBK
# ... omitted
x-windows-874
x-windows-949
x-windows-950
x-windows-iso2022jp

Help

charset

whatsub charset --help
Usage:
Whatsub charset (list ARGS... | convert ARGS...) [-h|--help HELP]

Charset conversion

Available options:
-h|--help HELP Prints the synopsis and a list of options and arguments.


Available commands:
list List all available charsets
convert Convert charset to another

charset convert

whatsub charset convert --help
Usage:
Whatsub charset convert -f|--from <from> [-t|--to <to>] <src> [<out>] [-h|--help HELP]

Convert charset to another

Available options:
-f|--from <from> The name of charset to be converted from (e.g. Windows-949 for
Korean charset)
-t|--to <to> The name of charset to be converted to (default: UTF-8)
-h|--help HELP Prints the synopsis and a list of options and arguments.

Positional arguments:
<src> The source subtitle file
<out> An optional output subtitle file. If missing, the result is printed
out.

charset list

whatsub charset list --help
Usage:
Whatsub charset list [-h|--help HELP]

List all available charsets

Available options:
-h|--help HELP Prints the synopsis and a list of options and arguments.