2
votes

I have a build that is checking out code from Perforce, but when I try to set the "VCS checkout mode" to server side, I know it does a copy of the workspace (and code) to the build agent. Well I discovered that it is clobbering some files we have in our build that are similar to text files. It is changing them from UNICODE BOM to UTF-8 and the tool we use to parse those files fails in the build.

Does anyone have an idea as to why TeamCity server side checkout and copy would be doing this? Does anyone know how to remedy this situation? Thanks!

2

2 Answers

1
votes

Thanks for the help, I figured out that the files that were in question where of type utf16 and there is actually an option in the Team City VCS Root configuration to enabled handling of utf16 files (Support UTF-16 encoding). This seemed to have resolved the issue.

0
votes

You say the clobbering only happens on TeamCity. Can you recheck how it behaves locally? Delete the file from your filesystem and run p4 sync -f FILE to get it fresh from the server. Is the BOM preserved?

If you can reproduce the loss of the BOM locally, then probably you should change the filetype of your file (in P4V, right-click | change Filetype | Base Filetype = Unicode or UTF-16 as appropriate).