mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 23:16:14 +01:00
g_file_info_get/set_attribute_string*(): Document the UTF-8ness.
* gio/gfileattribute.c: (_g_file_attribute_value_get_string, _g_file_attribute_value_set_string): These use G_FILE_ATTRIBUTE_TYPE_STRING, which is documented as UTF-8, so document these private functions as using UTF-8. * gio/gfileinfo.c: (g_file_info_get_attribute_string, g_file_info_set_attribute_string, and stringv versions): Document that the strings are UTF-8 because the implementation uses those private functions, that use UTF-8. This helps language bindings (such as glibmm) whose API distinguishes between known and unknown encodings.
This commit is contained in:
parent
9505ad05ee
commit
c1a75ca783
@ -466,7 +466,7 @@ _g_file_attribute_value_as_string (const GFileAttributeValue *attr)
|
||||
* Gets the string from a file attribute value. If the value is not the
|
||||
* right type then %NULL will be returned.
|
||||
*
|
||||
* Returns: the string value contained within the attribute, or %NULL.
|
||||
* Returns: the UTF-8 string value contained within the attribute, or %NULL.
|
||||
*/
|
||||
const char *
|
||||
_g_file_attribute_value_get_string (const GFileAttributeValue *attr)
|
||||
@ -695,9 +695,9 @@ _g_file_attribute_value_set_from_pointer (GFileAttributeValue *value,
|
||||
/*
|
||||
* _g_file_attribute_value_set_string:
|
||||
* @attr: a #GFileAttributeValue.
|
||||
* @string: a string to set within the type.
|
||||
* @string: a UTF-8 string to set within the type.
|
||||
*
|
||||
* Sets the attribute value to a given string.
|
||||
* Sets the attribute value to a given UTF-8 string.
|
||||
*/
|
||||
void
|
||||
_g_file_attribute_value_set_string (GFileAttributeValue *attr,
|
||||
|
@ -873,7 +873,7 @@ g_file_info_get_attribute_object (GFileInfo *info,
|
||||
* Gets the value of a string attribute. If the attribute does
|
||||
* not contain a string, %NULL will be returned.
|
||||
*
|
||||
* Returns: the contents of the @attribute value as a string, or
|
||||
* Returns: the contents of the @attribute value as a UTF-8 string, or
|
||||
* %NULL otherwise.
|
||||
**/
|
||||
const char *
|
||||
@ -922,7 +922,7 @@ g_file_info_get_attribute_byte_string (GFileInfo *info,
|
||||
* not contain a stringv, %NULL will be returned.
|
||||
*
|
||||
* Returns: (transfer none): the contents of the @attribute value as a stringv, or
|
||||
* %NULL otherwise. Do not free.
|
||||
* %NULL otherwise. Do not free. These returned strings are UTF-8.
|
||||
*
|
||||
* Since: 2.22
|
||||
**/
|
||||
@ -1171,8 +1171,8 @@ _g_file_info_set_attribute_stringv_by_id (GFileInfo *info,
|
||||
/**
|
||||
* g_file_info_set_attribute_stringv:
|
||||
* @info: a #GFileInfo.
|
||||
* @attribute: a file attribute key.
|
||||
* @attr_value: a %NULL terminated string array
|
||||
* @attribute: a file attribute key
|
||||
* @attr_value: a %NULL terminated array of UTF-8 strings.
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
@ -1209,7 +1209,7 @@ _g_file_info_set_attribute_string_by_id (GFileInfo *info,
|
||||
* g_file_info_set_attribute_string:
|
||||
* @info: a #GFileInfo.
|
||||
* @attribute: a file attribute key.
|
||||
* @attr_value: a string.
|
||||
* @attr_value: a UTF-8 string.
|
||||
*
|
||||
* Sets the @attribute to contain the given @attr_value,
|
||||
* if possible.
|
||||
|
Loading…
Reference in New Issue
Block a user