I have converted entire branch with .NET and SQL sources to UTF-8 with BOM, having their Perforce file type changed to Unicode in the same operation. (Encoding difference might sound confusing, but in Perforce, Unicode file type denotes UTF-8 file content.) But later I have found out that Perforce silently elliminates BOM marker from UTF-8 files. Is it possible to set Perforce to keep UTF-8 BOM markers in files of Unicode file type? I can't find it documented.
Perforce server is switched to Unicode mode, connection encoding is UTF-8 no BOM (but changing it to UTF-8 with BOM doesn't make any difference).
Example:
- check out a source file from Perforce
- change file type to Unicode
- convert file content to format "UTF-8 with BOM"
- submit the file (now the file still keeps BOM in first 3 bytes)
- remove the file from workspace
- get the latest revision of the file (now the file doesn't contain BOM at the beginning)