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
This commit is contained in:
Mathias Hasselmann 2007-12-06 10:22:13 +00:00
parent 6356a9dd98
commit c79ef3793c
2 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2007-12-06 Mathias Hasselmann <mathias@openismus.com>
* glib/gunidecomp.c: Mention g_utf8_normalize()
returns NULL on invalid string. (#501997)
2007-12-06 Mathias Hasselmann <mathias@openismus.com> 2007-12-06 Mathias Hasselmann <mathias@openismus.com>
* glib/gerror.c: Improve wording for g_propagate_error docs. * glib/gerror.c: Improve wording for g_propagate_error docs.

View File

@ -490,9 +490,10 @@ _g_utf8_normalize_wc (const gchar *str,
* Converts a string into canonical form, standardizing * Converts a string into canonical form, standardizing
* such issues as whether a character with an accent * such issues as whether a character with an accent
* is represented as a base character and combining * is represented as a base character and combining
* accent or as a single precomposed character. You * accent or as a single precomposed character. The
* should generally call g_utf8_normalize() before * string has to be valid UTF-8, otherwise %NULL is
* comparing two Unicode strings. * returned. You should generally call g_utf8_normalize()
* before comparing two Unicode strings.
* *
* The normalization mode %G_NORMALIZE_DEFAULT only * The normalization mode %G_NORMALIZE_DEFAULT only
* standardizes differences that do not affect the * standardizes differences that do not affect the
@ -515,7 +516,8 @@ _g_utf8_normalize_wc (const gchar *str,
* less capable Unicode handling. * less capable Unicode handling.
* *
* Return value: a newly allocated string, that is the * Return value: a newly allocated string, that is the
* normalized form of @str. * normalized form of @str, or %NULL if @str is not
* valid UTF-8.
**/ **/
gchar * gchar *
g_utf8_normalize (const gchar *str, g_utf8_normalize (const gchar *str,