[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: Locale is default port encoding
From: |
Andy Wingo |
Subject: |
[Guile-commits] 01/01: Locale is default port encoding |
Date: |
Mon, 11 Jul 2016 16:31:50 +0000 (UTC) |
wingo pushed a commit to branch stable-2.0
in repository guile.
commit e2c1659d953bb4973e612a041380ca2439b70a3e
Author: Andy Wingo <address@hidden>
Date: Fri Jun 24 07:43:58 2016 +0200
Locale is default port encoding
* libguile/ports.c (scm_init_ports): Use the locale as the default
charset. This allows GUILE_INSTALL_LOCALE=1 to work properly,
harmonizing the default port encoding with the installed locale.
---
NEWS | 1 +
libguile/ports.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/NEWS b/NEWS
index 36ab4c0..17b98c2 100644
--- a/NEWS
+++ b/NEWS
@@ -148,6 +148,7 @@ More ARM cross-compilation targets are supported: "arm.*eb",
(<http://bugs.gnu.org/19883>)
** Ports
+*** Setting GUILE_INSTALL_LOCALE=1 sets port default charset from locale
*** Fix port position handling on binary input ports
(<http://bugs.gnu.org/20302>)
*** Bytevector and custom binary ports to use ISO-8859-1
diff --git a/libguile/ports.c b/libguile/ports.c
index d7459b3..5a756b7 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -2911,6 +2911,9 @@ scm_init_ports ()
scm_make_fluid_with_default (SCM_BOOL_F));
scm_port_encoding_init = 1;
+ /* Use the locale as the default port encoding. */
+ scm_i_set_default_port_encoding (locale_charset ());
+
SCM_VARIABLE_SET (default_conversion_strategy_var,
scm_make_fluid_with_default (sym_substitute));
scm_conversion_strategy_init = 1;