Rust has from_utf8 (which can error), and from_utf8_lossy (which uses replacement characters), but I had to implement from_utf8_lossless myself...
Conversation
Notices
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Friday, 16-Aug-2024 07:00:42 JST Ryan Castellucci :nonbinary_flag: -
Embed this notice
Diego Augusto (diegovsky@fosstodon.org)'s status on Friday, 16-Aug-2024 14:51:43 JST Diego Augusto @ryanc but how do you decide invalid utf-8 sequences then?
-
Embed this notice
Ryan Castellucci :nonbinary_flag: (ryanc@infosec.exchange)'s status on Friday, 16-Aug-2024 14:51:43 JST Ryan Castellucci :nonbinary_flag: @diegovsky they get eacaped
-
Embed this notice