fixed issue in utf8-gen and added new script for checking backcompatibility