ExportXMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Critical
    • Component/s: p4-plugin
    • Environment:
      P4Jenkins 1.17.3
      Jenkins 2.555.1
      P4D 2025.2

      1.17.3 Cannot sync UTF8 files stored as text before utf8 filetype was released.

      Background:

      Before the utf8 filetype was created (P4D 2015.2) you had to store Windows files such as *.sln as ‘text’ on non unicode P4D servers. This also stored the BOM in the depot. A lot of these files have since been branched to newer projects so exist across customer systems.

       

      Problem:

      After upgrading to P4Jenkins 1.17.3 from earlier versions, when syncing the file the BOM is stripped so the MD5SUM check fails:
       
       ERROR: P4: Task Exception: com.perforce.p4java.exception.P4JavaException: com.perforce.p4java.exception.P4JavaException: hudson.AbortException: P4JAVA: Error(s):FileWithBOM_text_filetype.txt corrupted during transfer (or bad on the server) D548E75B94053CAD36D83CC6EFA8C471 vs 4D8A11E936F0965D08E29C17465513B7
      File in depot:
       
       PS C:\filestore\ws\localhost\test_ws\project1> Format-Hex "C:\Program Files\Perforce\Server\depot\project1\filewithbom_text_filetype.txt,v" Path: C:\Program Files\Perforce\Server\depot\project1\filewithbom_text_filetype.txt,v 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F00000010 61 63 63 65 73 73 20 20 20 3B 0D 0A 73 79 6D 62 access ;..symb00000020 6F 6C 73 20 20 3B 0D 0A 6C 6F 63 6B 73 20 20 20 ols ;..locks00000030 20 3B 63 6F 6D 6D 65 6E 74 20 20 40 40 3B 0D 0A ;comment @@;..00000040 0D 0A 0D 0A 31 2E 36 39 0D 0A 64 61 74 65 20 20 ....1.69..date00000050 20 20 20 32 30 32 36 2E 30 35 2E 30 31 2E 30 33 2026.05.01.0300000060 2E 35 37 2E 30 39 3B 20 20 61 75 74 68 6F 72 20 .57.09; author00000070 70 34 3B 20 20 73 74 61 74 65 20 45 78 70 3B 0D p4; state Exp;.00000080 0A 62 72 61 6E 63 68 65 73 20 3B 0D 0A 6E 65 78 .branches ;..nex00000090 74 20 20 20 20 20 3B 0D 0A 0D 0A 0D 0A 64 65 73 t ;......des000000A0 63 0D 0A 40 40 0D 0A 0D 0A 0D 0A 31 2E 36 39 0D c..@@......1.69.000000B0 0A 6C 6F 67 0D 0A 40 40 0D 0A 74 65 78 74 0D 0A .log..@@..text..000000C0 40 EF BB BF 54 68 69 73 20 68 61 73 20 61 20 42 @This has a B000000D0 4F 4D 20 69 6E 20 52 43 53 20 66 6F 72 6D 61 74 OM in RCS format000000E0 40 0D 0A @..
       

      File when synced with ‘P4’:
       PS C:\filestore\ws\localhost\test_ws\project1\> Format-Hex FileWithBOM_text_filetype.txt Path: C:\filestore\ws\localhost\test_ws\project1\FileWithBOM_text_filetype.txt 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F00000000 EF BB BF 54 68 69 73 20 68 61 73 20 61 20 42 4F This has a BO00000010 4D 20 69 6E 20 52 43 53 20 66 6F 72 6D 61 74 M in RCS format
       

      File when synced with P4Jenkins 1.17.3:
       PS C:\filestore\ws\localhost\test_ws\project1> Format-Hex E:\filestore\Jenkins\workspace\FileWithBOM_text_filetype.txt Path: E:\filestore\Jenkins\workspace\FileWithBOM_text_filetype.txt 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F00000000 54 68 69 73 20 68 61 73 20 61 20 42 4F 4D 20 69 This has a BOM i00000010 6E 20 52 43 53 20 66 6F 72 6D 61 74 n RCS format
       

      Reproduction Steps:

      (1) Create Jenkins Agent/Server on Windows.

      (2) Add a UTF8-BOM text file to the depot forcing the filetype on Windows client:

      p4 add -t text+D FileWithBOM_text_filetype.txt 
      p4 submit -d "Adding UTF8 BOM file as text." 

      (3) Run job. Error “corrupted during transfer (or bad on the server)” seen in console log and BOM missing on disk.
       

            Assignee:
            Unassigned
            Reporter:
            Karl Wirth
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: