Open ilyaryabchinski opened 1 year ago
Hi! I am trying to debug the issue and dive a bit deeper. I haven't touched C++ since my uni classes and don't have a production experience with it. But what I've found out so far is that the symbols get corrupted even before we call the Utf8Encode
function. So my guess is that it could be something wrong with the DllSetupDiGetDeviceRegistryProperty
function which is imported from the dll. Could you please help me to investigate further and fix this?
As far as I'm concerned, this library is EOL https://github.com/MadLittleMods/node-usb-detection/pull/169.
Have you tried https://github.com/node-usb/node-usb? Maybe it will handle this better?
If you want to try and fix this, I expect its a problem of this using the SetupDiGetDeviceRegistryPropertyA
(ansi) method from the DLL instead of the SetupDiGetDeviceRegistryPropertyW
(unicode) version. Maybe it will work if you switch which ones it is importing and fix up any resulting type errors?
Thanks @Julusian! I've just tried using SetupDiGetDeviceRegistryPropertyW
and now it prints only first letters, I guess it has something to do with buf sizes 🤔
it doesn't work 😢 I tried to fix and change all the types to WCHAR
and wstring
but somehow broke the logic
Hi! Huge thanks for your work on this great library!
Recently, I've been playing around with it in my Electron Project and found out that non-English symbols are not displayed correctly. I've seen similar issue and the corresponding PR that fixes it, but it seems like it's still the case.
Expected:
Actual behavior:
My Setup: OS: Win10 Nodejs 16.10.0 usb-detection 4.14.1
How to reproduce:
find
method