Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# Configure for Unicode

The P4 Server can be run in Unicode mode to activate support for file names or directory names that contain Unicode characters, and P4 Server identifiers (for example, user names) and specifications (for example, changelist descriptions or jobs) that contain Unicode characters.

In Unicode mode, the P4 Server also translates Unicode files and metadata to the character set configured on the user’s computer, and verifies that the Unicode files and metadata contain valid UTF-8 characters.

If you only need to manage textual files that contain Unicode characters, but do not need the features listed under Configure for Unicode, you do not need to run P4 Server in Unicode mode. Your system administrator will tell you if your site is using Unicode mode or not. For these installations, assign the P4 Server `utf16` file type to textual files that contain Unicode characters. You do not have to set the `P4CHARSET` or `P4COMMANDCHARSET` environment variables. See Assigning file types for Unicode files for details.

To correctly inter-operate in Unicode mode, and to ensure that such files are translated correctly by the P4 Server when the files are synced or submitted, you must set `P4CHARSET` to the character set that corresponds to the format used on your computer by the applications that access them, such as text editors or IDEs. These formats are typically listed when you save the file using the Save As…​ menu option.

Values of `P4CHARSET` that begin with `utf16` or `utf32` further require that you also set `P4COMMANDCHARSET` to a non `utf16` or `utf32` character set in which you want server output displayed. “Server output” includes informational and error messages, diff output, and information returned by reporting commands.

For a complete list of valid `P4CHARSET` values, issue the command `p4 help charset`.

For further information, see the P4 Server Administration Documentation.

## Setting P4CHARSET on Windows

To set `P4CHARSET` for all users on a computer, you need Windows administrator privileges. Issue the following command:

    C:\bruno_ws> p4 set -s P4CHARSET=character_set

To set `P4CHARSET` for the user currently logged in:

    c:\bruno_ws> p4 set P4CHARSET=character_set

Your computer must have a compatible TrueType or OpenType font installed.

## Setting P4CHARSET on UNIX

You can set `P4CHARSET` from a command shell or in a startup script such as `.kshrc`, `.cshrc`, or `.profile`. To determine the proper value for `P4CHARSET`, examine the setting of the `LANG` or `LOCALE` environment variable. Common settings are as follows

If `LANG` is…​ | Set `P4CHARSET` to
--- | ---
`en_US.ISO_8859-1` | `iso8859-1`
`ja_JP.EUC` | `eucjp`
`ja_JP.PCK` | `shiftjis`

In general, for a Japanese installation, set `P4CHARSET` to `eucjp`, and for a European installation, set `P4CHARSET` to `iso8859-1`.

Your search for returned results