From fa0c8d954ea67c74ce9fff143a2e09181e4cc964 Mon Sep 17 00:00:00 2001
From: Vadim Pisarevsky <no@email>
Date: Sat, 21 May 2011 09:29:21 +0000
Subject: [PATCH] allow lower-case utf-8 encoding specification as well

---
 modules/core/src/persistence.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/core/src/persistence.cpp b/modules/core/src/persistence.cpp
index b92d5458f..14c5b391d 100644
--- a/modules/core/src/persistence.cpp
+++ b/modules/core/src/persistence.cpp
@@ -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" );
     }