From 63525dd046489c5d05e2f99380d514b2b105f758 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 13 Dec 2025 11:27:50 -0800 Subject: [PATCH] Display of files in Windows-1251 encoding is broken in file blame view --- routers/web/repo/blame.go | 1 + 1 file changed, 1 insertion(+) diff --git a/routers/web/repo/blame.go b/routers/web/repo/blame.go index 0eebff6aa88b8..eb89dd9ceeb1c 100644 --- a/routers/web/repo/blame.go +++ b/routers/web/repo/blame.go @@ -274,6 +274,7 @@ func renderBlame(ctx *context.Context, blameParts []*git.BlamePart, commitNames if i != len(lines)-1 { line += "\n" } + line = util.UnsafeBytesToString(charset.ToUTF8([]byte(line), charset.ConvertOpts{})) line, lexerNameForLine := highlight.Code(path.Base(ctx.Repo.TreePath), language, line) // set lexer name to the first detected lexer. this is certainly suboptimal and