keygen: always use unicode internally