You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/06/08 14:21:16 UTC

svn commit: r1133367 - /subversion/trunk/subversion/libsvn_client/add.c

Author: stsp
Date: Wed Jun  8 12:21:16 2011
New Revision: 1133367

URL: http://svn.apache.org/viewvc?rev=1133367&view=rev
Log:
* subversion/libsvn_client/add.c
  (svn_client__get_auto_props): Add a comment explaining how mime-type
   detection with libmagic currently handles UTF-16 files and how this
   relates to potential future resolution of issue #2194.

Modified:
    subversion/trunk/subversion/libsvn_client/add.c

Modified: subversion/trunk/subversion/libsvn_client/add.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/add.c?rev=1133367&r1=1133366&r2=1133367&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/add.c (original)
+++ subversion/trunk/subversion/libsvn_client/add.c Wed Jun  8 12:21:16 2011
@@ -264,6 +264,13 @@ svn_client__get_auto_props(apr_hash_t **
         {
           const char *magic_mimetype;
 
+         /* Since libmagic usually treats UTF-16 files as "text/plain",
+          * svn_magic__detect_binary_mimetype() will return NULL for such
+          * files. This is fine for now since we currently don't support
+          * UTF-16-encoded text files (issue #2194).
+          * Once we do support UTF-16 this code path will fail to detect
+          * them as text unless the svn_io_detect_mimetype2() call above
+          * returns "text/plain" for them. */
           SVN_ERR(svn_magic__detect_binary_mimetype(&magic_mimetype,
                                                     path, magic_cookie,
                                                     pool, pool));