* if you reallocate the buffer anyway, or if your program does not care about the character set, this is not a problem.
* if your program blindly assumes that its input is valid UTF-8, don't bother – you're going to fail anyway.
* otherwise, a wrapper which NULLs an incomplete UTF8 character at the end of your buffer is ten lines of C and left as an exercise to the reader. ;-)
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds