getUTF8Char function created