Background
PR #54 added syllable directory download using os.Stdout.Write(data) for byte-safe output. Two pre-existing download commands still use fmt.Print(string(data)), which round-trips bytes through a Go string and can corrupt non-UTF-8 content:
Today both endpoints return text (CSV / takeout file metadata), so the bug is latent. The takeouts file endpoint in particular could legitimately return binary (audio, archive) and would silently mangle it.
Suggested change
Replace fmt.Print(string(data)) with os.Stdout.Write(data) in both commands, matching the pattern in directoryDownloadCmd.
Why a follow-up issue and not part of #54
Out of scope for that PR (bulk-ops feature) per code-review discussion. Filing here so it doesn't get lost.
Background
PR #54 added
syllable directory downloadusingos.Stdout.Write(data)for byte-safe output. Two pre-existing download commands still usefmt.Print(string(data)), which round-trips bytes through a Go string and can corrupt non-UTF-8 content:syllable pronunciations get-csv— cmd/pronunciations.go:55-59syllable takeouts download— cmd/takeouts.go:93-99Today both endpoints return text (CSV / takeout file metadata), so the bug is latent. The takeouts file endpoint in particular could legitimately return binary (audio, archive) and would silently mangle it.
Suggested change
Replace
fmt.Print(string(data))withos.Stdout.Write(data)in both commands, matching the pattern indirectoryDownloadCmd.Why a follow-up issue and not part of #54
Out of scope for that PR (bulk-ops feature) per code-review discussion. Filing here so it doesn't get lost.