Skip to content
foksaPublic

About

Convert subtitle files (.srt) from various encodings to UTF-8 for Plex compatibility

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

sub2utf

Convert subtitle files (.srt) from various encodings to UTF-8 for Plex compatibility.

Problem

Plex requires UTF-8 encoded subtitles. Downloaded subtitle files (especially for Serbian, Croatian, Polish, etc.) often use legacy encodings like Windows-1250 or ISO-8859-2, causing special characters to display incorrectly.

Solution

  • Web app: https://sub2utf.org - works in any browser
  • Desktop app: Native apps for macOS, Windows, Linux - saves files directly without dialogs

Both versions auto-detect encoding and convert to UTF-8 with Plex-compatible naming.

Download

Get the latest release from GitHub Releases.

Note: Apps are unsigned. See Code Signing for workarounds:

  • macOS: Run xattr -cr /Applications/sub2utf.app then open
  • Windows: Click "More info" → "Run anyway"

Build from Source

Prerequisites

  • Node.js 20.19+ (Node.js 24 LTS recommended)
  • Rust (for native app)

Web App

cd app
npm install
npm run dev      # Site at localhost:5173; desktop shell at localhost:5173/desktop.html
npm run build    # Five public pages -> dist/ (this is what gets deployed)
npm run check    # svelte-check + tsc

The generated chardetng WebAssembly bindings are committed to the repository. After changing app/src-wasm, install wasm-pack and run npm run wasm:build from the app directory, then commit the regenerated bindings.

Native App (Tauri)

cd app
npm install
npm run tauri dev      # Development with hot reload
npm run tauri build    # Production build

Build outputs:

  • macOS: app/src-tauri/target/release/bundle/dmg/
  • Windows: app/src-tauri/target/release/bundle/msi/
  • Linux: app/src-tauri/target/release/bundle/appimage/

Platform-specific dependencies

Ubuntu/Debian:

sudo apt install libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

macOS: Xcode Command Line Tools

xcode-select --install

Windows: Visual Studio Build Tools with C++ workload

Tech Stack

  • Frontend: Svelte 5 + Tailwind v4
  • Native Backend: Tauri v2 + Rust
  • Encoding Detection: chardetng (Mozilla's Firefox detector) — WASM on the web, native on desktop
  • Conversion: TextDecoder on the web, encoding_rs on desktop
  • Build: Vite (multi-page: site pages + a separate app-only desktop entry)

The web app is a multi-page site — see app/README.md for the entry points and why desktop.html is kept separate from the marketing pages.

Documentation

License

MIT

About

Convert subtitle files (.srt) from various encodings to UTF-8 for Plex compatibility

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages