utf8 routines. should be clean up