summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestBZR.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-05-18 14:34:35 (GMT)
committerBrad King <brad.king@kitware.com>2009-05-18 14:34:35 (GMT)
commit55c4cbbae91d1f24b30f8312156acbf9744235e5 (patch)
tree8944be3df3c29b86009710382cc8a22f4c2941da /Source/CTest/cmCTestBZR.cxx
parenta40bca5398d1b56d6e76828515ba058f6bf52091 (diff)
downloadCMake-55c4cbbae91d1f24b30f8312156acbf9744235e5.zip
CMake-55c4cbbae91d1f24b30f8312156acbf9744235e5.tar.gz
CMake-55c4cbbae91d1f24b30f8312156acbf9744235e5.tar.bz2
BUG: Parse more bzr xml output encodings
The BZR xml output plugin can use some encodings that are not recognized by expat, which leads to "Error parsing bzr log xml: unknown encoding". This works around the problem by giving expat a mapping, and adds a test. Patch from Tom Vercauteren. See issue #6857.
Diffstat (limited to 'Source/CTest/cmCTestBZR.cxx')
-rw-r--r--Source/CTest/cmCTestBZR.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index 7d8aa07..8e58636 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -67,7 +67,12 @@ int cmBZRXMLParserUnknownEncodingHandler(void*,
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF
};
- if ( name==std::string("ascii") || name==std::string("cp1252") )
+ // The BZR xml output plugin can use some encodings that are not
+ // recognized by expat. This will lead to an error, e.g. "Error
+ // parsing bzr log xml: unknown encoding", the following is a
+ // workaround for these unknown encodings.
+ if(name == std::string("ascii") || name == std::string("cp1252") ||
+ name == std::string("ANSI_X3.4-1968"))
{
for(unsigned int i=0;i<256;++i) info->map[i] = latin1[i];
return 1;