Explorar el Código

fix:修改导入乱码

jimmyyem hace 3 meses
padre
commit
dfb5a94dda
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  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)
 }