Re:Tell HN: C Experts Panel – Ask us anything about C
by barbegal on Tuesday April 14, 2020 @11:56AM
(#22867523)
Except that not all binary data is valid UTF-8 so you also need functions that check if a binary buffer is valid UTF-8.
[ Parent
| on HN ]
Re:Tell HN: C Experts Panel – Ask us anything about C
by Tronic2 on Tuesday April 14, 2020 @12:46PM
(#22868200)
The decoding phase will do that, if needed. Also note that in many cases you must process it as opaque binary, even though it should be valid UTF-8. This is in particular with filenames on POSIX systems because otherwise you could not access any files that happen to have invalid UTF-8 in their names.