Файли
openidea/crates
ntbang0901 bcee799269 fix(vcs): write and read commit messages in the commit's encoding (#8197)
With i18n.commitEncoding set to a legacy encoding (ISO-8859-1, Shift_JIS, GBK, windows-1251), Git names that encoding in each commit and expects the message in it. The IDE piped UTF-8 to git commit, so its commits read as mojibake in other tools, and decoded every commit as UTF-8, so correctly encoded commits showed replacement characters in the Git Log, commit details and Annotate, and Amend, Undo Commit and the rebase editor started from that text.

Messages are now written in i18n.commitEncoding (Commit, amending an earlier commit, the edited cherry-pick message, rebase rewords and squashes), and text it cannot represent is refused. Commits are read in the encoding they name (log index, rebase editor, Undo Commit), and git log/blame/show calls whose output the IDE parses pass -c i18n.logOutputEncoding=UTF-8. The log index tables move to new versions so cached summaries are decoded again.

Co-authored-by: ntbang0901 <[email protected]>
2026-12-05 17:53:38 +08:00
..