chiark / gitweb /
pass: Add comment on why we depend on coreutils
[termux-packages] / packages / newsbeuter / 007_translit.patch
1 diff -Naur newsbeuter-2.9.orig/src/stflpp.cpp newsbeuter-2.9/src/stflpp.cpp
2 --- newsbeuter-2.9.orig/src/stflpp.cpp  2015-02-19 11:56:59.000000000 +0100
3 +++ newsbeuter-2.9/src/stflpp.cpp       2016-06-02 23:38:15.880195527 +0200
4 @@ -16,7 +20,7 @@
5   */
6  
7  stfl::form::form(const std::string& text) : f(0) {
8 -       ipool = stfl_ipool_create((std::string(nl_langinfo(CODESET)) + "//TRANSLIT").c_str());
9 +       ipool = stfl_ipool_create(std::string(nl_langinfo(CODESET)).c_str());
10         if (!ipool) {
11                 throw exception(errno);
12         }
13 @@ -82,7 +86,7 @@
14  
15  std::string stfl::quote(const std::string& text) {
16         std::lock_guard<std::mutex> lock(quote_mtx);
17 -       stfl_ipool * ipool = stfl_ipool_create((std::string(nl_langinfo(CODESET)) + "//TRANSLIT").c_str());
18 +       stfl_ipool * ipool = stfl_ipool_create(std::string(nl_langinfo(CODESET)).c_str());
19         std::string retval = stfl_ipool_fromwc(ipool,stfl_quote(stfl_ipool_towc(ipool,text.c_str())));
20         stfl_ipool_destroy(ipool);
21         return retval;
22 diff -Naur newsbeuter-2.9.orig/src/utils.cpp newsbeuter-2.9/src/utils.cpp
23 --- newsbeuter-2.9.orig/src/utils.cpp   2015-02-19 11:56:59.000000000 +0100
24 +++ newsbeuter-2.9/src/utils.cpp        2016-06-02 23:38:38.648892251 +0200
25 @@ -262,7 +272,7 @@
26         if (strcasecmp(tocode.c_str(), fromcode.c_str())==0)
27                 return text;
28  
29 -       iconv_t cd = ::iconv_open((tocode + "//TRANSLIT").c_str(), fromcode.c_str());
30 +       iconv_t cd = ::iconv_open(tocode.c_str(), fromcode.c_str());
31  
32         if (cd == reinterpret_cast<iconv_t>(-1))
33                 return result;
34 @@ -498,7 +508,6 @@
35  
36  std::string utils::wstr2str(const std::wstring& wstr) {
37         std::string codeset = nl_langinfo(CODESET);
38 -       codeset.append("//TRANSLIT");
39         struct stfl_ipool * ipool = stfl_ipool_create(codeset.c_str());
40         std::string result = stfl_ipool_fromwc(ipool, wstr.c_str());
41         stfl_ipool_destroy(ipool);