Monday, November 25, 2013

Perforce: Translation of file content failed

This error practically introduced me to the Perforce version control system, and had no obvious explanation:

Scenario: I wanted to create a view of an existing file hierarchy containing many files on my local hard drive. As a part of the procedure, I executed the "Get latest revision". All but two files were transferred from the Perforce server, but two of the files logged the error "Translation of file content failed near line X". The file was missing when I looked at the physical location I was populating.

As many entries on the web mentions, encoding was the problem, but there are two places in P4V to set encoding - under Tools-Administration under Connections (which did not cut it for me), and:

Solution: Go to Connection-Choose Character Encoding and select the correct encoding.

I found the correct encoding by checking with a colleague who had it working. Otherwise: Trial and error will get you there (slowly).

2 comments:

Arielito said...

Thanks.

James said...

Good post. Solved my issue.