open
https://gitlab.synchro.net/main/sbbs/-/issues/1106
# Bug Report: Asymmetric UTF-8 autoterm detection corrupts user charset settings
**Date:** 2026-03-28
**Affects:** Synchronet BBS v3.20+ (confirmed on v3.21)
**Component:** `src/sbbs3/logon.cpp`, `src/sbbs3/answer.cpp`
**Related commit:** `aa0539b89` ("What appears to be a more complete fix for auto vs manual terminal adjustment", 2026-01-03)
---
## Summary
There are two interrelated issues that combine to corrupt registered users' terminal charset settings:
1. **One-way autoterm persistence in `logon.cpp`** — When autoterm detects UTF-8, the user record is upgraded to UTF-8, but when autoterm does NOT detect UTF-8 (i.e. CP437), the user record is never downgraded back. This means a single false positive permanently corrupts the user's charset setting.
2. **False UTF-8 detection over WebSocket proxy** — The UTF-8 BOM probe in `answer.cpp` is timing-sensitive. When the connection path includes a WebSocket intermediary (e.g. `websocketservice.js` used by fTelnet web terminals), the additional latency causes intermittent false positives in the UTF-8 cursor displacement check.
Either issue alone would be manageable, but together they create a ratchet effect: WebSocket latency occasionally triggers a false UTF-8 detection, and the one-way persistence ensures it sticks forever.
---
## How to reproduce
### Environment
- Syn