Add routines to switch between unicode and utf8.