summaryrefslogtreecommitdiff
path: root/glib/gunidecomp.c
diff options
context:
space:
mode:
authorMathias Hasselmann <hasselmm@src.gnome.org>2007-12-06 10:22:13 +0000
committerMathias Hasselmann <hasselmm@src.gnome.org>2007-12-06 10:22:13 +0000
commitc79ef3793ca9b26ee1cc4a5a4e2bec1e8c8ae839 (patch)
tree77240c89ea55370d2741f187c96685fa4195d1bf /glib/gunidecomp.c
parent6356a9dd984a0ac64f5247e79c747b432f69567a (diff)
downloadglib-c79ef3793ca9b26ee1cc4a5a4e2bec1e8c8ae839.tar.gz
Mention g_utf8_normalize() returns NULL on invalid string. (#501997)
* glib/gunidecomp.c: Mention g_utf8_normalize() returns NULL on invalid string. (#501997) svn path=/trunk/; revision=6058
Diffstat (limited to 'glib/gunidecomp.c')
-rw-r--r--glib/gunidecomp.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/glib/gunidecomp.c b/glib/gunidecomp.c
index 27624d3f4..e6e9fa565 100644
--- a/glib/gunidecomp.c
+++ b/glib/gunidecomp.c
@@ -486,13 +486,14 @@ _g_utf8_normalize_wc (const gchar *str,
* @str: a UTF-8 encoded string.
* @len: length of @str, in bytes, or -1 if @str is nul-terminated.
* @mode: the type of normalization to perform.
- *
+ *
* Converts a string into canonical form, standardizing
* such issues as whether a character with an accent
* is represented as a base character and combining
- * accent or as a single precomposed character. You
- * should generally call g_utf8_normalize() before
- * comparing two Unicode strings.
+ * accent or as a single precomposed character. The
+ * string has to be valid UTF-8, otherwise %NULL is
+ * returned. You should generally call g_utf8_normalize()
+ * before comparing two Unicode strings.
*
* The normalization mode %G_NORMALIZE_DEFAULT only
* standardizes differences that do not affect the
@@ -513,9 +514,10 @@ _g_utf8_normalize_wc (const gchar *str,
* useful if you intend to convert the string to
* a legacy encoding or pass it to a system with
* less capable Unicode handling.
- *
- * Return value: a newly allocated string, that is the
- * normalized form of @str.
+ *
+ * Return value: a newly allocated string, that is the
+ * normalized form of @str, or %NULL if @str is not
+ * valid UTF-8.
**/
gchar *
g_utf8_normalize (const gchar *str,