[BUG] CEA-708 .srt is written as Latin-1 and ignores --utf8/--latin1/--unicode

オープン
#2,450 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@yasar710 がすでに取り組んでいます。

2026年11月6日 から。

  • #2454 @yasar710 による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
c, rust

調査の方向性

Start by reading src/rust/src/decoder/output.rs and the C writer ccx_decoders_708_output.c, then trace how global encoding flags reach the 608 writer and the 708 writer. Test a CEA-708 stream containing accented G1 characters with default settings and --utf8, --latin1, and --unicode; done means 708 output follows the selected encoding, with UTF-8 as the documented default.

索引モデルが issue の本文から書いたものです。

説明

CCExtractor version: 0.96.6 release AppImage (--version prints 0.96.5, commit 185631dc). The code below is unchanged on master (d7eb132).

Necessary information

  • Is this a regression (i.e. did it work before)? Don't know
  • What platform did you use? Linux
  • What were the used arguments? -o out.srt (same result with --service 1)

Additional information

The CEA-708 .srt is written as raw Latin-1 bytes, while --help says UTF-8 is the default ("--utf8: Encode subtitles in UTF-8 (no longer needed because UTF-8 is now the default)"). --utf8, --latin1 and --unicode don't change the 708 file at all.

On an MXF with 608 and 708 captions in Portuguese, one run gives a UTF-8 608 file and a Latin-1 708 file:

$ ccextractor in.mxf -o out.srt
$ file out.srt out.p0.svc01.srt
out.srt:           Unicode text, UTF-8 text, with CRLF line terminators
out.p0.svc01.srt:  ISO-8859 text, with CRLF line terminators

"você" in the 708 file is 76 6f 63 ea, the same with no flag, --utf8, --latin1 or --unicode. Only a per-service charset gives UTF-8: --service "1[ISO-8859-1]" writes 76 6f 63 c3 aa.

From the code, the 708 writer never looks at the global encoding. With no service charset there is no iconv descriptor, and write_char in src/rust/src/decoder/output.rs (and the C writer in ccx_decoders_708_output.c) writes the internal symbol bytes as they are, so G1 characters come out as their Latin-1 byte. I expected the 708 output to follow --utf8/--latin1/--unicode like the 608 output does, with UTF-8 as the default.

The input is a 395 KB MXF that I can share if it helps. Any 708 stream with G1 characters (accented letters) should show the same thing.

主要言語
C
スター
913
フォーク
603
平均マージ
1日 10時間
マージ済み PR(30日)
24

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CCExtractor/ccextractor のほかの issue

CCExtractor/ccextractor の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。