FreeBSD Bugzilla – Attachment 186691 Details for
Bug 215393
devel/boost-libs: bad encoding conversion with base iconv()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Prefer ICU (workaround)
boost.prefer.icu.diff (text/plain), 3.93 KB, created by
Jan Beich
on 2017-09-25 07:02:11 UTC
(
hide
)
Description:
Prefer ICU (workaround)
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2017-09-25 07:02:11 UTC
Size:
3.93 KB
patch
obsolete
>From f33c2530c7e0a9cae3b381a256dd6a7561ea07ee Mon Sep 17 00:00:00 2001 >From: Jan Beich <jbeich@FreeBSD.org> >Date: Mon, 25 Sep 2017 06:20:08 +0000 >Subject: [PATCH] devel/boost-libs: improve lossy character encoding > >PR: 215393 >--- > devel/boost-libs/Makefile | 1 + > .../patch-libs_locale_src_encoding_codepage.cpp | 58 ++++++++++++++++++++++ > 2 files changed, 59 insertions(+) > create mode 100644 devel/boost-libs/files/patch-libs_locale_src_encoding_codepage.cpp > >diff --git a/devel/boost-libs/Makefile b/devel/boost-libs/Makefile >index 30da37ea6450..ba89ddc4371d 100644 >--- a/devel/boost-libs/Makefile >+++ b/devel/boost-libs/Makefile >@@ -2,6 +2,7 @@ > # $FreeBSD$ > > PORTNAME= boost-libs >+PORTREVISION= 1 > > COMMENT= Free portable C++ libraries (without Boost.Python) > >diff --git a/devel/boost-libs/files/patch-libs_locale_src_encoding_codepage.cpp b/devel/boost-libs/files/patch-libs_locale_src_encoding_codepage.cpp >new file mode 100644 >index 000000000000..adc9e0a7730e >--- /dev/null >+++ b/devel/boost-libs/files/patch-libs_locale_src_encoding_codepage.cpp >@@ -0,0 +1,58 @@ >+Prefer ICU for better skip conversion policy >+ >+--- libs/locale/src/encoding/codepage.cpp.orig 2017-09-02 09:56:14 UTC >++++ libs/locale/src/encoding/codepage.cpp >+@@ -40,13 +40,13 @@ namespace boost { >+ method_type how) >+ { >+ std::auto_ptr<converter_between> cvt; >+- #ifdef BOOST_LOCALE_WITH_ICONV >+- cvt.reset(new iconv_between()); >++ #ifdef BOOST_LOCALE_WITH_ICU >++ cvt.reset(new uconv_between()); >+ if(cvt->open(to_charset,from_charset,how)) >+ return cvt->convert(begin,end); >+ #endif >+- #ifdef BOOST_LOCALE_WITH_ICU >+- cvt.reset(new uconv_between()); >++ #ifdef BOOST_LOCALE_WITH_ICONV >++ cvt.reset(new iconv_between()); >+ if(cvt->open(to_charset,from_charset,how)) >+ return cvt->convert(begin,end); >+ #endif >+@@ -66,13 +66,13 @@ namespace boost { >+ method_type how) >+ { >+ std::auto_ptr<converter_to_utf<CharType> > cvt; >+- #ifdef BOOST_LOCALE_WITH_ICONV >+- cvt.reset(new iconv_to_utf<CharType>()); >++ #ifdef BOOST_LOCALE_WITH_ICU >++ cvt.reset(new uconv_to_utf<CharType>()); >+ if(cvt->open(charset,how)) >+ return cvt->convert(begin,end); >+ #endif >+- #ifdef BOOST_LOCALE_WITH_ICU >+- cvt.reset(new uconv_to_utf<CharType>()); >++ #ifdef BOOST_LOCALE_WITH_ICONV >++ cvt.reset(new iconv_to_utf<CharType>()); >+ if(cvt->open(charset,how)) >+ return cvt->convert(begin,end); >+ #endif >+@@ -92,13 +92,13 @@ namespace boost { >+ method_type how) >+ { >+ std::auto_ptr<converter_from_utf<CharType> > cvt; >+- #ifdef BOOST_LOCALE_WITH_ICONV >+- cvt.reset(new iconv_from_utf<CharType>()); >++ #ifdef BOOST_LOCALE_WITH_ICU >++ cvt.reset(new uconv_from_utf<CharType>()); >+ if(cvt->open(charset,how)) >+ return cvt->convert(begin,end); >+ #endif >+- #ifdef BOOST_LOCALE_WITH_ICU >+- cvt.reset(new uconv_from_utf<CharType>()); >++ #ifdef BOOST_LOCALE_WITH_ICONV >++ cvt.reset(new iconv_from_utf<CharType>()); >+ if(cvt->open(charset,how)) >+ return cvt->convert(begin,end); >+ #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 215393
:
178070
|
178071
|
178072
|
178073
|
178074
| 186691 |
186721
|
186738