[MacPorts] #56214: inkscape @ 0.92.2_2 all variants: libc++abi.dylib Glib::ConvertError

MacPorts noreply at macports.org
Mon Apr 16 11:40:08 UTC 2018


#56214: inkscape @ 0.92.2_2 all variants: libc++abi.dylib Glib::ConvertError
-------------------------+----------------------
  Reporter:  streincorp  |      Owner:  dbevans
      Type:  defect      |     Status:  accepted
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.4.2
Resolution:              |   Keywords:
      Port:  inkscape    |
-------------------------+----------------------

Comment (by neverpanic):

 I think the problem may be that iconv is used for character set conversion
 from a `std::wstring`'s internal memory representation and iconv assumes
 what the actual encoding is (despite the C++ standard not specifying one).
 Here's a minimal reproducer:

 {{{
 #!cpp
 /* clang++ -std=c++11 -Wall -Werror $(pkg-config --cflags --libs
 glibmm-2.4) test.cpp -o test */
 #include <glibmm.h>
 #include <iostream>
 #include <string>

 int main() {
         std::wstring str = L"Fööööö";
         GError* error = nullptr;
         gsize n_bytes;
         const auto buf = g_convert(reinterpret_cast<const
 char*>(str.data()), str.size() * sizeof(std::wstring::value_type),
 "UTF-8", "WCHAR_T", nullptr, &n_bytes, &error);

         if (error) {
                 std::cout << error->message << std::endl;
         } else {
                 std::cout << buf << std::endl;
         }
 }
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/56214#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list