hap icon indicating copy to clipboard operation
hap copied to clipboard

accessory pair failed if name is unicode

Open zeropool opened this issue 3 years ago • 4 comments

nas := accessory.NewSwitch(accessory.Info{
		Name:         "服务器",
		SerialNumber: "052AC-26AAM3",
		Manufacturer: "Apple",
		Model:        "AB",
	})

iphone will stuck when add accessory name use unicode unless the name is ascii charset

zeropool avatar Aug 27 '22 11:08 zeropool

There are similar bugs in hc. (I haven't verified if they're still issues in hap but I'm guessing they might be)

https://github.com/brutella/hc/issues/192 https://github.com/brutella/hc/issues/195

joeshaw avatar Nov 21 '22 21:11 joeshaw

Same on me. there's a 400 bad request from hap server, I got it from wireshark, said malformed data or something, but I can't reproduce it now...

And the name will be used in domain, "服务器._hap._tcp.local" that might be related.

0x5e avatar Jul 27 '23 06:07 0x5e

https://github.com/brutella/hap/blob/4ea1de40019c8a72bf7096d8842120ed581038ec/server.go#L489C45-L489C45 Currently the project only handles the whitespaces and latin characters.

0x5e avatar Jul 27 '23 07:07 0x5e

Happy to accept any pull request which fixes this issue. 😉

brutella avatar Aug 07 '23 08:08 brutella