Adding a default encoding UTF-8 character to pattern-matching check