Scanning Perforce Repository Fails With 'Unable to determine latest revision. Check output encoding'

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

You get the following error from a perforce repository:

1 2 3 4 5 6 7 8 9 ERROR - Problem processing revisions from repo localhost:1666//depot due to class com.cenqua.fisheye.perforce.client.P4ClientException - Unable to determine latest revision. Check output encoding com.cenqua.fisheye.perforce.client.P4ClientException: Unable to determine latest revision. Check output encoding at com.cenqua.fisheye.perforce.client.P4Client.getLatestRevision(P4Client.java:90) at com.cenqua.fisheye.perforce.P4Scanner.getLatestRevision(P4Scanner.java:742) at com.cenqua.fisheye.rep.RepositoryScanner.processRevisions(RepositoryScanner.java:323) at com.cenqua.fisheye.rep.RepositoryScanner.slurpRepository(RepositoryScanner.java:268) at com.cenqua.fisheye.rep.RepositoryScanner.slurp(RepositoryScanner.java:188) at com.cenqua.fisheye.rep.RepositoryScanner.ping(RepositoryScanner.java:121) at com.cenqua.fisheye.perforce.P4RepositoryEngine.doSlurp(P4RepositoryEngine.java:73)

Cause

This is caused due to a mismatch between the p4 client and server encoding.

You might get this error, if you have set the P4CHARSET environment variable to UTF-8, but you are not running your perforce server in unicode.

Resolution

To resolve the problem you will need to make sure the perforce server and client character are correctly configured.

Consult with your perforce administrator if you do not know what these settings should be. Also, refer to Perforce's knowledge base article.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.