input.rs icon indicating copy to clipboard operation
input.rs copied to clipboard

Panic when reading invalid UTF-8 strings in the device name

Open Jethril opened this issue 3 weeks ago • 0 comments

I got a SL600 microphone that seems to be manufactured by ISK. Its manufacturer field is padded with 0xFF which generates invalid UTF-8 strings.
Possible replacements for the assertions (expect("Device name is no valid utf8")) are:

  • returning a CStr or OsStr
  • to_string_lossy(), but this will allocate a String

What would be your (owners) approach to do that? I may be volunteer to do the PR.

This causes https://github.com/pop-os/cosmic-comp/issues/1906

Jethril avatar Dec 18 '25 22:12 Jethril