Windows: fix reading of User Description characteristic


The code assumed that the value is encoded in UTF-16, so treated the
input buffer as a sequence of char16_t characters.

However, the Bluetooth Spec [0] tells that the value of this
characteristic is encoded in UTF-8.

The bug existed since the introduction of the service details discovery
feature back in 057b17ede8f25312f86337783ae0fa780221cc59, but picking
this fix only down to 6.5, because 5.15 is in a very strict mode at this
point.

[0]: Bluetooth Core Spec v 5.3, Vol. 3, Part G, 3.3.3.2

Fixes: QTBUG-132202
Pick-to: 6.9 6.8 6.5
Change-Id: I70ec0de6c2fe1b5d25f9351d73320042c76823d4
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
commite93b602ddbc64b3db32ce1ff483754b341c44b7e
parent1a489deb37b24641b6c4fab2af199c03b1ce6037
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeFri, 20 Dec 2024 11:19:42 +0100