Comments (4)
@ma6254 Thanks for reporting this; it looks like we're using the ANSI version of the windows API, which is probably why this breaks. Can you try this patched branch and let me know if it fixes your issue?
https://github.com/mlsvrts/serialport-rs/tree/fix-unicode-names
from serialport-rs.
@mlsvrts
commit id : 9f65b84c04c2c002f20371f345ec8027751542c0
it not work
It's frustrating. I think the problem is unsolvable
Hardware designers consider only the local language and use a specific encoding format, such as "GBK", rather than the standard "UTF-8"
so sad 😥
from serialport-rs.
@ma6254 Actually, this may have been an issue with my patch! I checked again, and the device manufacturer and "friendly name" are read from the registry keys -- this was still being done with an ANSI windows API.
I have swapped that with the unicode version on the above branch (see commit: b53f5f3)
Possibly we could have issues with the USB descriptor, but I think it's very likely that the registry strings are proper unicode.
from serialport-rs.
@mlsvrts
is works
> cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `target\debug\aaa.exe`
Hello, world!
1
COM10 USB 串行设备 (COM10)
from serialport-rs.
Related Issues (20)
- Missing serial_number HOT 4
- Encountered a problem during the process of making this library into a Flutter plugin HOT 8
- Bootstrap (or resurrect) a cross-platform port-to-port serial transmit/receive test application HOT 4
- UsbPorts are detected as PciPorts on Raspberry Pi 4b HOT 9
- Dependency on unmaintained crates HOT 12
- Publish 4.2.2 version on crates.io HOT 2
- Type of a serialport HOT 2
- Last port.write does not send all bytes on FTDI dongle HOT 7
- Read always timeout in arm-unknown-linux-musleabihf HOT 5
- Serial write stalls application on some Windows machines HOT 7
- Windows USB001 possible? HOT 2
- Wrong informations with Com port HOT 2
- FlowControl::Hardware not set on Siliconlabs Ember dongle on Linux HOT 9
- Linux: `serialport::available_ports()` returns generic USB strings instead of actual descriptor values HOT 3
- Add supported architecture HOT 2
- windows: UsbPortInfo: Provide the same info about Manufacturer and Product name as POSIX HOT 2
- Auto reconnect HOT 1
- use read_to_end always return TimedOut err HOT 2
- Stuck when writing data to the serial port if paired port is not open [Windows 11] HOT 2
- USB ports detected as unknown in docker HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serialport-rs.