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

P4 CLI Documentation | 2025.2

# Choose the file type for Unicode files

When assigning file types to textual files that contain Unicode, consider the following:

- Do you need to edit and diff the files?

  Many IDEs create configuration files that you never edit manually or diff. To ensure they are never translated, assign such files the `binary` file type.

- Is your site managing files that use different character sets?

  If so, consider storing them using a `utf16` file type, to ensure they are not translated but still can be diffed.

Unicode mode services translate the contents of Unicode files into the character set specified by `P4CHARSET`. The following table provides more details about how Unicode-mode services manage the various types of text files:

Text file type | Stored by P4 Server as (Unicode mode) | Validated? | Translated per `P4CHARSET`? | Translated per client platform
--- | --- | --- | --- | ---
`text` | Extended ASCII | No | No | No
`unicode` | UTF-8 | Yes (as UTF-16 and `P4CHARSET`) | Yes | No
`utf16` | UTF-8 | Yes (as UTF-16) | No | No

Non-Unicode-mode services do not translate or verify the contents of `unicode` files. Instead, the UTF-8 data is converted to UTF-16 using the byte order appropriate to the client platform. To ensure that such files are not corrupted when you edit them, save them as UTF-8 or UTF-16 from within your editing software.

Text file type | Stored by P4 Server as (Unicode mode) | Validated? | Translated per `P4CHARSET`? | Translated per client platform
--- | --- | --- | --- | ---
`text` | Extended ASCII | No | No | No
`unicode` | UTF-8 | Yes (as UTF-16 and `P4CHARSET`) | No | No
`utf16` | UTF-8 | Yes (as UTF-16) | No | Yes

Your search for returned results