allow lower-case utf-8 encoding specification as well
authorVadim Pisarevsky <no@email>
Sat, 21 May 2011 09:29:21 +0000 (09:29 +0000)
committerVadim Pisarevsky <no@email>
Sat, 21 May 2011 09:29:21 +0000 (09:29 +0000)
modules/core/src/persistence.cpp

index b92d545..14c5b39 100644 (file)
@@ -2149,7 +2149,9 @@ icvXMLParse( CvFileStorage* fs )
     }*/
     {
         const char* encoding = cvAttrValue( list, "encoding" );
-        if( encoding && strcmp( encoding, "ASCII" ) != 0 && strcmp( encoding, "UTF-8" ) != 0 )
+        if( encoding && strcmp( encoding, "ASCII" ) != 0 &&
+            strcmp( encoding, "UTF-8" ) != 0 &&
+            strcmp( encoding, "utf-8" ) != 0 )
             CV_PARSE_ERROR( "Unsupported encoding" );
     }