fix(perforce): Support Unicode Perforce server connections#115775
Conversation
mujacica
commented
May 19, 2026
- Support Unicode Perforce server connections
| A Unicode-enabled server rejects clients that don't declare a charset on | ||
| connect. The value here is passed verbatim to `p4.charset` before | ||
| `p4.connect()`. "none" preserves legacy behavior (non-Unicode server) by | ||
| skipping `p4.charset` entirely. |
There was a problem hiding this comment.
Would it be safe to just use unicode by default when connecting?
There was a problem hiding this comment.
Sadly there is no handshake between the server and client. Both server and client need to have the same encoding configured so that the connection can succeed - before any data gets exchanged. So if server is unicode, client needs to set unicode. If server is not unicode, client can't set unicode - otherwise it won't work again.
There was a problem hiding this comment.
Also there is an 'auto' mode - but it just takes the current machine encoding and not the server encoding, since the encoding is needed for connection itself....
vaind
left a comment
There was a problem hiding this comment.
LGTM but for the potential concern about pre-existing integrations.
| "initialized in Unicode mode (`p4d -xi`). Unicode servers " | ||
| "reject clients that do not declare a charset on connect." | ||
| ), | ||
| "required": True, |
There was a problem hiding this comment.
required=true
do we need a backfill for already defined integrations?
There was a problem hiding this comment.
Shouldn't be necessary - this code handles installation configuration form. The rest of the code (https://github.com/getsentry/sentry/pull/115775/changes#diff-bd63a841162b9ef7990a5ba091a324f5155871943afd92f750e1d9720f2ecb55R196) and (https://github.com/getsentry/sentry/pull/115775/changes#diff-bd63a841162b9ef7990a5ba091a324f5155871943afd92f750e1d9720f2ecb55R141) - gracefully handles empty states. For the new integrations and/or configuration changes we require this field to be set. Until then the dropdown menu is going to be shown empty.
* Support Unicode Perforce server connections