replace utf8strchr with wcschr