Giter Club home page Giter Club logo

Comments (4)

mlsvrts avatar mlsvrts commented on May 30, 2024

@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.

ma6254 avatar ma6254 commented on May 30, 2024

@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.

mlsvrts avatar mlsvrts commented on May 30, 2024

@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.

ma6254 avatar ma6254 commented on May 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.