diff options
Diffstat (limited to 'modules/base/template.go')
-rw-r--r-- | modules/base/template.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/base/template.go b/modules/base/template.go index f5f567aded..0fd1af755c 100644 --- a/modules/base/template.go +++ b/modules/base/template.go @@ -59,8 +59,8 @@ func ShortSha(sha1 string) string { func DetectEncoding(content []byte) (string, error) { detector := chardet.NewTextDetector() result, err := detector.DetectBest(content) - if result.Charset != "UTF-8" && len(setting.AnsiCharset) > 0 { - return setting.AnsiCharset, err + if result.Charset != "UTF-8" && len(setting.Repository.AnsiCharset) > 0 { + return setting.Repository.AnsiCharset, err } return result.Charset, err } |