Commit 16190d2d authored by Mikhail Zabaluev's avatar Mikhail Zabaluev Committed by Matthias Clasen

glib/genviron.c, GSubprocessLauncher: ain't no "filename encoding"

Removed all mentions of GLib file name encoding referring to
the environment strings. The env var content has no defined relation
to GLib's notion of filename encoding, or any encoding whatsoever.
It would be wrong to pass all UTF-8 strings through
g_filename_from_utf8() in order to put them into the environment,
for one thing.

https://bugzilla.gnome.org/show_bug.cgi?id=738185
parent b31a873f
......@@ -237,9 +237,8 @@ g_subprocess_launcher_new (GSubprocessFlags flags)
* As an alternative, you can use g_subprocess_launcher_setenv(),
* g_subprocess_launcher_unsetenv(), etc.
*
* All strings in this array are expected to be in the GLib file name
* encoding. On UNIX, this means that they can be arbitrary byte
* strings. On Windows, they should be in UTF-8.
* On UNIX, all strings in this array can be arbitrary byte strings.
* On Windows, they should be in UTF-8.
*
* Since: 2.40
**/
......@@ -261,10 +260,9 @@ g_subprocess_launcher_set_environ (GSubprocessLauncher *self,
* Sets the environment variable @variable in the environment of
* processes launched from this launcher.
*
* Both the variable's name and value should be in the GLib file name
* encoding. On UNIX, this means that they can be arbitrary byte
* strings. On Windows, they should be in UTF-8.
*
* On UNIX, both the variable's name and value can be arbitrary byte
* strings, except that the variable's name cannot contain '='.
* On Windows, they should be in UTF-8.
*
* Since: 2.40
**/
......@@ -285,9 +283,8 @@ g_subprocess_launcher_setenv (GSubprocessLauncher *self,
* Removes the environment variable @variable from the environment of
* processes launched from this launcher.
*
* The variable name should be in the GLib file name encoding. On UNIX,
* this means that they can be arbitrary byte strings. On Windows, they
* should be in UTF-8.
* On UNIX, the variable's name can be an arbitrary byte string not
* containing '='. On Windows, it should be in UTF-8.
*
* Since: 2.40
**/
......@@ -306,9 +303,8 @@ g_subprocess_launcher_unsetenv (GSubprocessLauncher *self,
* Returns the value of the environment variable @variable in the
* environment of processes launched from this launcher.
*
* The returned string is in the GLib file name encoding. On UNIX, this
* means that it can be an arbitrary byte string. On Windows, it will
* be UTF-8.
* On UNIX, the returned string can be an arbitrary byte string.
* On Windows, it will be UTF-8.
*
* Returns: the value of the environment variable, %NULL if unset
*
......
......@@ -70,8 +70,7 @@ g_environ_find (gchar **envp,
* @envp: (allow-none) (array zero-terminated=1) (transfer none): an environment
* list (eg, as returned from g_get_environ()), or %NULL
* for an empty environment list
* @variable: the environment variable to get, in the GLib file name
* encoding
* @variable: the environment variable to get
*
* Returns the value of the environment variable @variable in the
* provided list @envp.
......@@ -218,14 +217,13 @@ g_environ_unsetenv (gchar **envp,
/**
* g_getenv:
* @variable: the environment variable to get, in the GLib file name
* encoding
* @variable: the environment variable to get
*
* Returns the value of an environment variable.
*
* The name and value are in the GLib file name encoding. On UNIX,
* this means the actual bytes which might or might not be in some
* consistent character set and encoding. On Windows, it is in UTF-8.
* On UNIX, the name and value are byte strings which might or might not
* be in some consistent character set and encoding. On Windows, they are
* in UTF-8.
* On Windows, in case the environment variable's value contains
* references to other environment variables, they are expanded.
*
......@@ -248,10 +246,9 @@ g_getenv (const gchar *variable)
* @value: the value for to set the variable to.
* @overwrite: whether to change the variable if it already exists.
*
* Sets an environment variable. Both the variable's name and value
* should be in the GLib file name encoding. On UNIX, this means that
* they can be arbitrary byte strings. On Windows, they should be in
* UTF-8.
* Sets an environment variable. On UNIX, both the variable's name and
* value can be arbitrary byte strings, except that the variable's name
* cannot contain '='. On Windows, they should be in UTF-8.
*
* Note that on some systems, when variables are overwritten, the memory
* used for the previous variables and its value isn't reclaimed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment