Unicode

Perforce (P4) server Unicode mode setup to fix Chinese filename/folder garbled text

Perforce (P4) server Unicode mode setup to fix Chinese filename/folder garbled text

Problem environment: p4d running on a Linux server, P4ROOT created with default settings, Unicode not enabled. Clients: Windows P4V and Mac P4V. In P4Admin, Server Info showed Unicode support: disabled. When a Windows client added files/folders with Chinese names and submitted them, the Mac client displayed garbled text in the Depot. After Get, filenames were saved with %20 style encoding.

Checking further: with Unicode disabled, in P4V the Connections → Choose Character Encoding… menu was grayed out. In Preferences → Display → Set encoding for all connections to:, Windows default was CP936 GBK, Mac default was UTF‑8. This mismatch caused Chinese names uploaded from Windows to appear garbled on Mac. Forcing P4CHARSET to UTF‑8 or using p4 set produced the error: ‘Unicode clients require a unicode enabled server‘.

Solution: enable Unicode mode on the server.

Continue reading…