add symbols-nerd fonts
[oi-userland.git] / components / library / glibmm / patches / glib_glibmm_ustring.cc.patch
blob630fb41f4461dbb5732186a5dd9d19d793ddc5be
1 OI (and Solaris) iconv doesn't support WCHAR_T <-> UTF-8 conversions
2 ( https://www.illumos.org/issues/5089 ). But internal encoding used
3 in WCHAR_T is UCS-4LE, so we use it.
5 --- glibmm-2.58.0/glib/glibmm/ustring.cc 2018-05-06 12:47:56.000000000 +0000
6 +++ glibmm-2.58.0/glib/glibmm/ustring.cc.new 2018-12-01 19:55:47.373116133 +0000
7 @@ -1377,7 +1377,7 @@ ustring::FormatStream::to_string() const
8 #else
9 gsize n_bytes = 0;
10 const auto buf = make_unique_ptr_gfree(g_convert(reinterpret_cast<const char*>(str.data()),
11 - str.size() * sizeof(std::wstring::value_type), "UTF-8", "WCHAR_T", nullptr, &n_bytes, &error));
12 + str.size() * sizeof(std::wstring::value_type), "UTF-8", "UCS-4LE", nullptr, &n_bytes, &error));
13 #endif /* !(__STDC_ISO_10646__ || G_OS_WIN32) */
15 #else /* !GLIBMM_HAVE_WIDE_STREAM */
16 @@ -1465,7 +1465,7 @@ operator>>(std::wistream& is, ustring& u
17 #else
18 gsize n_bytes = 0;
19 const auto buf = make_unique_ptr_gfree(g_convert(reinterpret_cast<const char*>(wstr.data()),
20 - wstr.size() * sizeof(std::wstring::value_type), "UTF-8", "WCHAR_T", nullptr, &n_bytes, &error));
21 + wstr.size() * sizeof(std::wstring::value_type), "UTF-8", "UCS-4LE", nullptr, &n_bytes, &error));
22 #endif // !(__STDC_ISO_10646__ || G_OS_WIN32)
24 if (error)
25 @@ -1493,7 +1493,7 @@ operator<<(std::wostream& os, const ustr
26 g_utf8_to_utf16(utf8_string.raw().data(), utf8_string.raw().size(), nullptr, nullptr, &error));
27 #else
28 const auto buf = make_unique_ptr_gfree(g_convert(utf8_string.raw().data(),
29 - utf8_string.raw().size(), "WCHAR_T", "UTF-8", nullptr, nullptr, &error));
30 + utf8_string.raw().size(), "UCS-4LE", "UTF-8", nullptr, nullptr, &error));
31 #endif // !(__STDC_ISO_10646__ || G_OS_WIN32)
33 if (error)