Perforce Public Knowledge Base - Using "iconv" to Address Conversion and Migration Issues
Downloads Blog Company Integrations Careers Contact Try Free
Menu Search
Reset Search



Using "iconv" to Address Conversion and Migration Issues

« Go Back




Missing Files During Verify

After migrating the Perforce database and versioned files, running p4 verify produces errors similar to:

//depot/foo/verrckt.c#1 - edit change 46102 (text) 252F3099E90B3F453841BE2800EC7D08 MISSING!

You confirm that the versioned file is present on the Perforce server, but the file name is displayed differently:


Perforce cannot find this versioned file because it is looking for "verrckt.c" instead of "verrckt.c ". This is most common after moving a checkpoint from a Windows server to a Unix based server -- the file names with special characters are encoded as LATIN1 under Windows, which might not match the UTF-8 encoded file names.

Cannot Convert Server to Unicode Mode

Regardless of server platform, file names submitted from Windows clients using extended characters can cause a Perforce server error when switching to Unicode mode:

Perforce Server Error:
Database has N tables with non-UTF8 text and can't be switched to Unicode mode.

You can use the iconv utility to convert extended characters to UTF-8 Unicode encoding. The iconv tool is available for UNIX and Windows from the following ftp site:
It is also typically installed by default on most UNIX based operating systems.

Windows Installation
Using "iconv"
  • Make a new checkpoint of the server, and copy it to a temporary location.
  • Convert this new checkpoint using iconv. The following is an example conversion command for converting Windows encoding to UTF-8:
    iconv -f LATIN1 -t utf-8 checkpoint.1234 > checkpoint.utf8
    Another typical conversion would be switching from codepage 1251 on Linux to utf-8
    iconv -f CP1251 -t UTF-8 checkpoint.2313 > checkpoint.iconv.2313
  • Move your Perforce database (db.* files) from your P4ROOT directory and put them in a safe location.
  • Recover from the converted checkpoint. This recreates the Perforce database with Unicode characters in place of the high ASCII characters.

At this point, you can verify that the "MISSING" files are present, or you can switch the server to Unicode mode without error.

Note: The iconv tool is not supported by Perforce.

Related Links

Documentation for iconv tool (Third Party Site)
iconv tool (Third Party Site)



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255