Port to libmucharmap