I'm trying to enumerate the audio device in the system with QAudioDeviceInfo, this is the codes:

Qt Code:
  1. foreach(const QAudioDeviceInfo &deviceInfo, QAudioDeviceInfo::availableDevices(QAudio::AudioInput)){
  2. QString name = deviceInfo.deviceName();
  3. qDebug() << "Device name: " << name;
  4. }
To copy to clipboard, switch view to plain text mode 

If the system is windows, and the character code is GBK, the deviceName is very strange. I dumped the hex datas from deviceName.
soundcard.PNG

I looked into GBK code page: http://www.khngai.com/chinese/charmap/tblgbk.php?page=4
The soudcard info is chinese language, and GBK coding. But each byte followed by one 00, even the ascii parts.

My question is how to convert the byte array to real unicode QString with QT method? If this is a bug for QT?