mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-14 19:55:12 +01:00
gcharset: Document the CHARSET environment variable a bit
Users should probably never be setting this — instead, just add the charset after a `.` in `LANGUAGE`/`LC_ALL`/`LC_*`/`LANG`. I can’t find any reference (in `git log`, code comments, or man pages) to this environment variable being standardised or documented or even used anywhere outside GLib. Perhaps it should eventually be removed. If anybody finds references as to why GLib checks `CHARSET`, this comment can be updated in future. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2514
This commit is contained in:
parent
922df0c8e6
commit
7dc7b84a52
@ -109,6 +109,12 @@ static gboolean
|
||||
g_utf8_get_charset_internal (const char *raw_data,
|
||||
const char **a)
|
||||
{
|
||||
/* Allow CHARSET to override the charset of any locale category. Users should
|
||||
* probably never be setting this — instead, just add the charset after a `.`
|
||||
* in `LANGUAGE`/`LC_ALL`/`LC_*`/`LANG`. I can’t find any reference (in
|
||||
* `git log`, code comments, or man pages) to this environment variable being
|
||||
* standardised or documented or even used anywhere outside GLib. Perhaps it
|
||||
* should eventually be removed. */
|
||||
const char *charset = g_getenv ("CHARSET");
|
||||
|
||||
if (charset && *charset)
|
||||
|
Loading…
x
Reference in New Issue
Block a user