Minor refactoring of utf8.c