summaryrefslogtreecommitdiff
path: root/devel/glib20/files/patch-revert-8abf3a0
blob: 54a1539ecf1e16d1a94dc2cbc04c4d00cf01646d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Revert https://gitlab.gnome.org/GNOME/glib/commit/8abf3a04e699 for
breaking at least graphics/inkscape as wchar_t is locale-dependent.

--- glib/gconvert.c.orig	2025-03-06 13:09:13 UTC
+++ glib/gconvert.c
@@ -165,12 +165,6 @@ g_iconv_open (const gchar  *to_codeset,
  * GLib provides g_convert() and g_locale_to_utf8() which are likely
  * more convenient than the raw iconv wrappers.
  * 
- * Note that the behaviour of iconv() for characters which are valid in the
- * input character set, but which have no representation in the output character
- * set, is implementation defined. This function may return success (with a
- * positive number of non-reversible conversions as replacement characters were
- * used), or it may return -1 and set an error such as %EILSEQ, in such a
- * situation.
  *
  * See [`iconv(3posix)`](man:iconv(3posix)) and [`iconv(3)`](man:iconv(3)) for more details about behavior when an
  * error occurs.
@@ -283,14 +277,6 @@ close_converter (GIConv cd)
  * character until it knows that the next character is not a mark that
  * could combine with the base character.)
  *
- * Characters which are valid in the input character set, but which have no
- * representation in the output character set will result in a
- * %G_CONVERT_ERROR_ILLEGAL_SEQUENCE error. This is in contrast to the iconv()
- * specification, which leaves this behaviour implementation defined. Note that
- * this is the same error code as is returned for an invalid byte sequence in
- * the input character set. To get defined behaviour for conversion of
- * unrepresentable characters, use g_convert_with_fallback().
- *
  * Returns: (array length=bytes_written) (element-type guint8) (transfer full):
  *               If the conversion was successful, a newly allocated buffer
  *               containing the converted string, which must be freed with
@@ -370,13 +356,6 @@ g_convert_with_iconv (const gchar *str,
 	      break;
 	    }
 	}
-      else if (err > 0)
-        {
-          /* @err gives the number of replacement characters used. */
-          g_set_error_literal (error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE,
-                               _("Unrepresentable character in conversion input"));
-          have_error = TRUE;
-        }
       else 
 	{
 	  if (!reset)
--- glib/gconvert.h.orig	2025-03-06 13:09:13 UTC
+++ glib/gconvert.h
@@ -39,9 +39,7 @@ G_BEGIN_DECLS
  * GConvertError:
  * @G_CONVERT_ERROR_NO_CONVERSION: Conversion between the requested character
  *     sets is not supported.
- * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input;
- *    or the character sequence could not be represented in the target
- *    character set.
+ * @G_CONVERT_ERROR_ILLEGAL_SEQUENCE: Invalid byte sequence in conversion input.
  * @G_CONVERT_ERROR_FAILED: Conversion failed for some reason.
  * @G_CONVERT_ERROR_PARTIAL_INPUT: Partial character sequence at end of input.
  * @G_CONVERT_ERROR_BAD_URI: URI is invalid.