gentoo90/winreg-rs

Lossy utf8 conversion error prone

brson opened this issue · 1 comments

brson commented

This can just be taken as feedback for what it's worth.

In rustup I recently submitted a patch to stop using get_value / set_value/ for strings of the HKCU\Environment\PATH value. rustup needs to read and write the value and it was important to detect and preserve the non-unicode.

Providing lossless OsString conversions may help, since then I could handle the encoding issues on my side, while still using the nice get_value / set_value fns.

Hi, sorry for delay.
I added impl FromRegValue for OsString and impl<'a> ToRegValue for &'a OsStr in 753699f.
Published on crates.io as v0.3.5.