Merge branch 'ebassi/collate-docs' into 'main'

Collation keys are not encoded in UTF-8

See merge request GNOME/glib!4260
This commit is contained in:
Philip Withnall 2024-09-09 19:30:39 +00:00
commit c09ffca226

View File

@ -375,8 +375,13 @@ carbon_collate_key_for_filename (const gchar *str,
* *
* Note that this function depends on the [current locale][setlocale]. * Note that this function depends on the [current locale][setlocale].
* *
* Returns: a newly allocated string. This string should * Note that the returned string is not guaranteed to be in any
* be freed with g_free() when you are done with it. * encoding, especially UTF-8. The returned value is meant to be
* used only for comparisons.
*
* Returns: (transfer full) (type filename): a newly allocated string.
* The contents of the string are only meant to be used when sorting.
* This string should be freed with g_free() when you are done with it.
**/ **/
gchar * gchar *
g_utf8_collate_key (const gchar *str, g_utf8_collate_key (const gchar *str,
@ -504,8 +509,13 @@ g_utf8_collate_key (const gchar *str,
* *
* Note that this function depends on the [current locale][setlocale]. * Note that this function depends on the [current locale][setlocale].
* *
* Returns: a newly allocated string. This string should * Note that the returned string is not guaranteed to be in any
* be freed with g_free() when you are done with it. * encoding, especially UTF-8. The returned value is meant to be
* used only for comparisons.
*
* Returns: (transfer full) (type filename): a newly allocated string.
* The contents of the string are only meant to be used when sorting.
* This string should be freed with g_free() when you are done with it.
* *
* Since: 2.8 * Since: 2.8
*/ */