소스 검색

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)
 }