瀏覽代碼

fix:修改导入乱码

jimmyyem 3 月之前
父節點
當前提交
dfb5a94dda
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      internal/logic/contact/import_whatsapp_contact_logic.go

+ 3 - 1
internal/logic/contact/import_whatsapp_contact_logic.go

@@ -146,7 +146,9 @@ func trim(s string) string {
 
 func transCharset(s string) string {
 	s = trim(s)
+	return s
 	rd := transform.NewReader(bytes.NewReader([]byte(s)), simplifiedchinese.GBK.NewDecoder())
-	bytes, _ := io.ReadAll(rd)
+	bytes, err := io.ReadAll(rd)
+	fmt.Printf("bytes=%s err=%v\n", bytes, err)
 	return string(bytes)
 }