Hacker News new | past | comments | ask | show | jobs | submit login

> That would require knowing the original encoding.

If you don't know that's one more reason to get bytes and try to figure out encoding. Usually using lib like encodings.rs or WTF8.rs

> As long as the APIs you have to use take bytes and not utf8 strings.

You can convert one into the other, albeit converting to str requires a check.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: