diff options
author | Unknwon <u@gogs.io> | 2015-12-25 05:25:47 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-12-25 05:25:47 -0500 |
commit | 85af36332b89a42152c7e2b76af5e2aeb048103a (patch) | |
tree | f1eabbd273416ecf34125183c1df994b2b0ca578 /modules/base/tool.go | |
parent | 13fe73303726d74356a5d94bad7556802c2900a4 (diff) | |
download | gitea-85af36332b89a42152c7e2b76af5e2aeb048103a.tar.gz gitea-85af36332b89a42152c7e2b76af5e2aeb048103a.zip |
#2282 fix utf-8 recognized as windows-1252
Diffstat (limited to 'modules/base/tool.go')
-rw-r--r-- | modules/base/tool.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go index 46eeca9b2b..9dcbb881d5 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -25,6 +25,7 @@ import ( "golang.org/x/net/html/charset" "github.com/gogits/gogs/modules/avatar" + "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/setting" ) @@ -52,7 +53,8 @@ func ShortSha(sha1 string) string { } func DetectEncoding(content []byte) string { - _, name, _ := charset.DetermineEncoding(content, setting.Repository.AnsiCharset) + _, name, certain := charset.DetermineEncoding(content, setting.Repository.AnsiCharset) + log.Debug("Detected encoding: %s (%v)", name, certain) return name } |