When typing a chat message that contains a special character on a server with chat preview enabled, an exception will occur and you get disconnected.
Steps to reproduce:
- Join a server with chat preview enabled.
- Type any letter until you can't type anymore.
- Press backspace once.
- Type a special character like a "☺" for example.
- Observe disconnect.
See client log attached: