diff --git a/platform/core-api/src/com/intellij/openapi/vfs/VfsUtilCore.java b/platform/core-api/src/com/intellij/openapi/vfs/VfsUtilCore.java index fbb665f9c54c..5813e05e930b 100644 --- a/platform/core-api/src/com/intellij/openapi/vfs/VfsUtilCore.java +++ b/platform/core-api/src/com/intellij/openapi/vfs/VfsUtilCore.java @@ -241,6 +241,7 @@ public class VfsUtilCore { @NotNull public static VirtualFile copyFile(Object requestor, @NotNull VirtualFile file, @NotNull VirtualFile toDir, @NotNull String newName) throws IOException { VirtualFile newChild = toDir.createChildData(requestor, newName); + newChild.setBOM(file.getBOM()); newChild.setBinaryContent(file.contentsToByteArray(), -1, -1, requestor); return newChild; }