Re: [web-bluetooth] Wrong handling of property 'name' for BLE devices (#570)

Actually the NUL character is fully valid in UTF-8, although not a printable one.

The Bluetooth standard says the following:

> The Bluetooth Device Name can be up to 248 bytes (see [Vol 2] Part C, Section 4.3.5). It shall be encoded according to UTF-8 (therefore the name entered on the UI level may be restricted to as few as 62 characters if codepoints outside the range U+0000 to U+007F are used).

It here explicitly lists U+0000 (and all other non-printable characters) as codepoints.

This is most likely an implementation bug where NUL-terminated C strings are used somewhere in the pipeline and not a WebBluetooth specification issue.

-- 
GitHub Notification of comment by Emill
Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/570#issuecomment-991566032 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 11 December 2021 09:14:28 UTC