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

P4 for Jenkins Documentation | 1.17.3

# Unicode

This section covers specific issues and configuration settings for a Unicode enabled Perforce P4 Server and the Jenkins build environment.

## Charsets

A Perforce Client Workspace must specify a Charset specific to the platform (Windows, Linux, and so on) when accessing files from a Unicode enabled P4 Server. The Workspace configuration provides a CHARSET dropdown (with a default of 'none' for non-unicode P4 Servers). For more information about Perforce Character sets please refer to our internationalization notes.

## UTF8 BOM

The UTF8 charset supports an optional BOM (Byte Order Mark) at the start of the file, represented by the byte sequence 0xEF 0xBB 0xBF. If a file has been added to Perforce with the type set to utf8, then the default behavior is to sync the file with a BOM even if the file did not originally have the BOM sequence in the file.

There is an undocumented Perforce configurable filesys.utf8bom which can be modified to change the default behavior:

    filesys.utf8bom  (default 1)    Set to 0 to prevent writing utf8 files BOM
                                    Set to 1 to write utf8 files with a BOM
                                    Set to 2 to write utf8 BOM only on Windows

For Jenkins to make use of the configurable you need to set the JVM property on the Jenkins Primary Server or Build Agent. For example:

-Dcom.perforce.p4java.filesys.utf8bom=0

For most use-cases you will need set the JVM option for the agent build node:

1. From the Jenkins dashboard, click Manage Jenkins and click Manage Nodes.
2. Click New Node or select an existing node and click Configure.

3. If you selected New Node:

   1. Enter a Node name

   2. Select Permanent Agent

   3. Click Create

4. (Optional) Configure the node as required.
5. In Launch method, click Advanced and add the -D property to the JVM Options.
6. Click Save.

Your search for returned results