Index: subversion/libsvn_subr/io.c
===================================================================
--- subversion/libsvn_subr/io.c	(revision 1186983)
+++ subversion/libsvn_subr/io.c	(working copy)
@@ -2968,6 +2968,13 @@ svn_io_detect_mimetype2(const char **mimetype,
   /* Now close the file.  No use keeping it open any more.  */
   SVN_ERR(svn_io_file_close(fh, pool));
 
+  if (amt_read == 3 && block[0] == 0xEF && block[1] == 0xBB && block[2] == 0xBF)
+    {
+      /* This is an empty UTF-8 file which only contains the UTF-8 BOM.
+       * Treat it as plain text. */
+      return SVN_NO_ERROR;
+    }
+  
   if (svn_io_is_binary_data(block, amt_read))
     *mimetype = generic_binary;

