From 7076f096264c8733c67cfbf286f96355e3ddd4ab Mon Sep 17 00:00:00 2001 From: suyl <770236076@qq.com> Date: Fri, 9 Jul 2021 15:08:08 +0800 Subject: [PATCH] test sound --- business/jxstore/event/event_tcp.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/jxstore/event/event_tcp.go b/business/jxstore/event/event_tcp.go index 3e2a5f979..cbc0552cb 100644 --- a/business/jxstore/event/event_tcp.go +++ b/business/jxstore/event/event_tcp.go @@ -478,7 +478,8 @@ func replaceContent(content string, printMsg *model.PrintMsg) (result string) { realSound := soundPerfix + sound allLen := fmt.Sprintf("%x", (len("fd001a0101")+len(realSound))/2) soundLenH, soundLenX := int2h8l8(int64(len(realSound) / 2)) - result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0101"+fmt.Sprintf("%x", soundPerfix)) + hexPrefix, _ := jxutils.Utf8ToGbk([]byte(soundPerfix)) + result = strings.ReplaceAll(result, byteSignSound, hexSignSound+allLen+"fd"+soundLenH+soundLenX+"0101"+hex.EncodeToString(hexPrefix)) } } }