From 95f9c85bcc8f915d823f57cd5923302dfc156504 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 13 Dec 2015 19:56:33 -0500 Subject: #2185 use Go sub-repo to detect encoding --- modules/template/template.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'modules/template') diff --git a/modules/template/template.go b/modules/template/template.go index 9d63452d..cc670a65 100644 --- a/modules/template/template.go +++ b/modules/template/template.go @@ -127,11 +127,7 @@ func Sha1(str string) string { } func ToUtf8WithErr(content []byte) (error, string) { - charsetLabel, err := base.DetectEncoding(content) - if err != nil { - return err, "" - } - + charsetLabel := base.DetectEncoding(content) if charsetLabel == "UTF-8" { return nil, string(content) } -- cgit v1.2.3