+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
+2002-01-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * glib/gconvert.c (g_convert_with_fallback): If g_convert fails,
+ set bytes_written to 0 and close the iconv descriptor that was
+ opened a few lines above. On a successful return, calculate
+ bytes_written to be outp - dest instead of outp - str.
+
2002-01-16 Sven Neumann <sven@gimp.org>
* acinclude.m4
utf8 = g_convert (str, len, "UTF-8", from_codeset,
bytes_read, &inbytes_remaining, error);
if (!utf8)
- return NULL;
+ {
+ g_iconv_close (cd);
+ if (bytes_written)
+ *bytes_written = 0;
+ return NULL;
+ }
/* Now the heart of the code. We loop through the UTF-8 string, and
* whenever we hit an offending character, we form fallback, convert
g_iconv_close (cd);
if (bytes_written)
- *bytes_written = outp - str; /* Doesn't include '\0' */
+ *bytes_written = outp - dest; /* Doesn't include '\0' */
g_free (utf8);