Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.3, 6.7.0, 6.8.1
-
None
-
Windows 11 23H2
Qt 6.8.1 Qt 6.7.0 Qt 6.5.3
MSVC2022 64bit
-
-
3
-
e93b602dd (dev), 867c18db8 (6.9), d0c14973e (6.8), d0fb34321 (tqtc/lts-6.5)
-
Foundation Sprint 122
Description
On the Windows platform, for characteristics that have a User Description, tthere is a garbled text issue with the characteristic names displayed in the example lowenergyscanner.
Look at the following picture. The red box on the left side of the image should display "Enter Sleep Mode" instead of garbled text (the right side of the image shows the result viewed using the Bluetooth LE Explorer software).
We discussed this issue on the Qt forum and found that it seems to be caused by the QWinRTLowEnergyServiceHandler::obtainCharList function and the QLowEnergyControllerPrivateWinRT::readDescriptorHelper function in qlowenergycontroller_winrt.cpp incorrectly assuming that CharacteristicUserDescription returns UTF-16 (when in fact it returns UTF-8), which led to this error. For more details, please refer to https://forum.qt.io/post/816777, https://forum.qt.io/post/816778.
For the full discussion, please refer to: https://forum.qt.io/topic/160084/how-to-solve-the-problem-of-garbled-characters-in-characteristic-names-for-lowenergyscanner-on-the-windows-platform.
Attachments
For Gerrit Dashboard: QTBUG-132202 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
612765,3 | Windows: fix reading of User Description characteristic | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |
613314,2 | Windows: fix reading of User Description characteristic | 6.9 | qt/qtconnectivity | Status: MERGED | +2 | 0 |
613447,3 | Windows: fix reading of User Description characteristic | 6.8 | qt/qtconnectivity | Status: MERGED | +2 | 0 |
614520,2 | Windows: fix reading of User Description characteristic | tqtc/lts-6.5 | qt/tqtc-qtconnectivity | Status: MERGED | +2 | 0 |