> Date: Mon, 30 Jan 2017 20:42:38 +0000 (UTC) > From: Mike Gran <[email protected]> > Cc: "[email protected]" <[email protected]> > > Earlier in the 2.0.x release series, Guile had a hack where it started > up in a Latin-1 encoding, which would be capable of storing any > 8-bit string of bytes, even if they weren't Latin-1.
Latin-1 has holes in the 0..255 range, so it isn't very appropriate in this situation. > And what was supposed to happen after setlocale was called? What Emacs does is explicitly decode any variable produced until that moment that is known to hold unibyte strings. > As an aside, GTK and GLIB based applications often use a method where > you may need to set the environment variable G_FILENAME_ENCODING > if your filename encoding is different from your locale encoding. > GTK/GLIB also likes to store strings internally as UTF-8, and will > convert to UTF-8 from either the locale or the G_FILENAME_ENCODING- > specified encoding. Emacs stores all environment variables in their original locale-specific encoding, as unibyte strings, and only decodes them when they are actually used or handed to Lisp.
