Exclamation mark and special characters in usernames

Did you base it on an existing import script? If you had, it would call discourse/lib/user_name_suggester.rb at main · discourse/discourse · GitHub and just worked.