fixed crash on android and some utf8 conv.