I have the following error message in when submitting from my perforce client (p4v):
Translation of file content failed near line 1 Submit aborted -- fix problems then use 'p4 submit -c 22'. Some file(s) could not be transferred from client.
I don't know what it means or how to solve the problem.
The real porblem is the encoding, set the encoding to UTF-8 using the "Connection -> Choose Character Encoding..." menu item fixed the problem
Perforce may be confused as to the file's type. Perhaps this is a binary file that Perforce thinks is text? Right click on the file and select the "Change Filetype..." item. This will open a dialog that allows you to change the file's type. Make sure it is set correctly and submit the file again.
FWIW, this issue just occurred to me and I was unable to revert any files or perform pretty much any operation. Even removing files from workspace and then trying to get them again caused the translation of file content error. This issue started happening for me after P4V crashed.
To fix it, I just went to Connection > Choose Character Encoding and clicked OK on the dialog box (did not change the encoding to anything else - kept it what it already was) and that fixed it for me.
This problem can also occur when the file doesn't actually exist on disk. A couple of scenarios can play into this.
Honestly, I'm a bit surprised that the error indicated in the original question was due to a filetype mismatch. I've never seen that be the case. In case (1), a file that is 'p4 add'ed will be added as type 'text' by default if a file doesn't exist on disk. If the file was supposed to be a binary file, that would indicate a type mismatch, but that's not the cause of failure to transfer the file from the client. It's the fact that the file doesn't exist.
Anyway, that's my experience. I figured that i would share the cases where I've seen this error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With