Skip to content

Commit 8cadbad

Browse files
authored
Merge pull request #147 from Leizhenpeng/fix/md_encoding_error
fix: unicode characters show problem
2 parents 31aa8bb + 2cf6d2a commit 8cadbad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/binary-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ jobs:
3636
md5sum: false
3737
project_path: "./code"
3838
binary_name: "feishu-chatgpt"
39-
extra_files: ./code/config.example.yaml readme.md
39+
extra_files: ./code/config.example.yaml readme.md LICENSE ./code/role_list.yaml

code/handlers/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func processUnicode(msg string) string {
6060
r, _ := regexp.Compile(`\\u`)
6161
s = r.ReplaceAllString(s, "")
6262
i, _ := strconv.ParseInt(s, 16, 32)
63-
return strconv.Itoa(int(i))
63+
return string(rune(i))
6464
})
6565
}
6666

0 commit comments

Comments
 (0)