Branch libreoffice-7-2-5
[LibreOffice.git] / external / boost / boost.noiconv.patch
blob1bce0414d4ba5cb02921e2fb90688cabab5f7a59
1 diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
2 --- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
3 +++ foo/misc/boost/libs/locale/src/encoding/codepage.cpp
4 @@ -39,6 +39,7 @@
5 char const *from_charset,
6 method_type how)
8 + #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
9 hold_ptr<converter_between> cvt;
10 #ifdef BOOST_LOCALE_WITH_ICONV
11 cvt.reset(new iconv_between());
12 @@ -55,6 +56,7 @@
13 if(cvt->open(to_charset,from_charset,how))
14 return cvt->convert(begin,end);
15 #endif
16 + #endif
17 throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
20 @@ -65,6 +67,7 @@
21 char const *charset,
22 method_type how)
24 + #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
25 hold_ptr<converter_to_utf<CharType> > cvt;
26 #ifdef BOOST_LOCALE_WITH_ICONV
27 cvt.reset(new iconv_to_utf<CharType>());
28 @@ -81,6 +84,7 @@
29 if(cvt->open(charset,how))
30 return cvt->convert(begin,end);
31 #endif
32 + #endif
33 throw invalid_charset_error(charset);
36 @@ -91,6 +95,7 @@
37 char const *charset,
38 method_type how)
40 + #if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
41 hold_ptr<converter_from_utf<CharType> > cvt;
42 #ifdef BOOST_LOCALE_WITH_ICONV
43 cvt.reset(new iconv_from_utf<CharType>());
44 @@ -107,6 +112,7 @@
45 if(cvt->open(charset,how))
46 return cvt->convert(begin,end);
47 #endif
48 + #endif
49 throw invalid_charset_error(charset);