From c7ce59312c5cfb4649653236210194356951d746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Tue, 26 Jul 2022 14:49:38 +0800 Subject: [PATCH] 1 --- business/jxstore/event/event_tcp_utils.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/business/jxstore/event/event_tcp_utils.go b/business/jxstore/event/event_tcp_utils.go index efe4a599c..b93566232 100644 --- a/business/jxstore/event/event_tcp_utils.go +++ b/business/jxstore/event/event_tcp_utils.go @@ -505,20 +505,20 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) { int16Sound := strconv.FormatInt(intSound, 16) voice += int16Sound } - voiceDataGBK, _ := jxutils.Utf8ToGbk([]byte(voice)) - voiceData := hex.EncodeToString(voiceDataGBK) + //voiceDataGBK, _ := jxutils.Utf8ToGbk([]byte(voice)) + //voiceData := hex.EncodeToString(voiceDataGBK) //[8]sounda14 ->5b385d736f756e64613134 //realSound := hexPrefixStr + voiceData - realSound := voiceData - allLen := fmt.Sprintf("%x", (len(realSound))/2) - if len(allLen) < 2 { - allLen = "0" + allLen - } + //realSound := voiceData + //allLen := fmt.Sprintf("%x", (len(realSound))/2) + //if len(allLen) < 2 { + // allLen = "0" + allLen + //} //soundLenH, soundLenX := int2h8l8(int64((len(realSound) + len("0101")) / 2)) //result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0100"+hexPrefixStr) - result = strings.ReplaceAll(result, byteSignSound, hexSignSoundOld+realSound) + result = strings.ReplaceAll(result, byteSignSound, hexSignSoundOld+voice) //} } }