You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Initialize a Git repository containing a source file encoded in GBK / GB18030 / GB2312 (common in legacy C/C++ embedded projects and Windows codebases) without .gitattributesworking-tree-encoding:
Open the Review / Diff panel for the working tree changes (and optionally expand unchanged context lines or inspect a commit diff).
Expected behavior
Chinese / non-ASCII text in GBK / GB18030 / GB2312 files should be readable in the Diff panel (e.g., via fallback decoding such as gb18030 when UTF-8 decoding produces U+FFFD replacement characters, or a per-file/panel encoding selector).
Note: Adding working-tree-encoding=GBK in .gitattributes is often not viable on existing GBK repositories because it changes how Git stores blobs on future commits rather than just how diffs are decoded for display.
Actual behavior
All non-ASCII GBK characters render as replacement characters (\uFFFD / mojibake) in both the diff hunks and expanded unchanged context.
Looking at apps/server/src/vcs/GitVcsDriverCore.ts on main:
collectOutput (line 943, used by executeGit for git diff --patch and git show in getReviewDiffPreview / readReviewFileAtRevision) hardcodes new TextDecoder("utf-8", { ignoreBOM: true }).
readWorkingTreeReviewFile (line 5187, used when expanding unchanged working-tree context) also hardcodes new TextDecoder("utf-8", { ignoreBOM: true }).
Impact
Major degradation or frequent failure
Version or commit
0.1.11 (also verified on main: apps/server/src/vcs/GitVcsDriverCore.ts)
Activity