added check for invalid utf-8 encoding.
added check for invalid utf-8 encoding.

Signed-off-by: Rui Hirokawa <566a32b4d10a7cd414ca0bdda139ff5b5e2b42d5@contrib.scilab.org>

moriyoshi/libmbfl,moriyoshi/libmbfl,moriyoshi/libmbfl