8 lines
394 B
Markdown
8 lines
394 B
Markdown
Title: How to check if a string is valid utf-8
|
|
|
|
Every day (at least) I'm facing a problem: how to check if a string is
|
|
valid in utf-8 ? So I wrote [a little C program, that I put on my
|
|
github](https://github.com/JulienPalard/is_utf8). Just be aware that
|
|
pure ASCII is valid UTF-8 and that's not a bug: my program is checking
|
|
if a string is valid utf-8, not if the string is in utf-8. Enjoy :-)
|