blob: bb45357085497985048ceb31341a8640d4438ea5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
--- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
+++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp
@@ -58,6 +58,9 @@
return cvt->convert(begin,end);
#endif
#endif
+ // ensures we get a sensible warning in boost's gettext results about a real mismatch.
+ if (to_charset && from_charset && !strcmp(to_charset, from_charset))
+ return std::string(begin, end - begin);
throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
}
|