Resolved the issue that "Invalid chatacters in username" will be reported when the player whose name contains "invalid" characters join the game (only 1.18.2 and above).
Commands containing "invalid" player names can be executed correctly.
Dedicated servers read console input using the system encoding.
Players whose names contain @, blank characters, and English quotation marks are prohibited from joining the game.