unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob f03aaaffe5f723c1c01faeec2516b2d4c1ccafef 3169 bytes (raw)
name: gnu/packages/patches/guile-default-utf8.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 
This hack makes Guile default to UTF-8.  This avoids calls to
`iconv_open'; `iconv_open' tries to open shared objects that aren't
available during bootstrap, so using UTF-8 avoids that (and UTF-8 has
built-in conversions in glibc, too.)

diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c
index cf41f2f..facfb91 100644
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@ -1887,7 +1887,7 @@ utf_encoding_name (char *name, size_t utf_width, SCM endianness)
   if (scm_i_is_narrow_string (str))                                     \
     {                                                                   \
       err = mem_iconveh (scm_i_string_chars (str), c_strlen,            \
-                         "ISO-8859-1", c_utf_name,                      \
+                         "UTF-8", c_utf_name,                      \
                          iconveh_question_mark, NULL,                   \
                          &c_utf, &c_utf_len);                           \
       if (SCM_UNLIKELY (err))                                           \
diff --git a/libguile/posix.c b/libguile/posix.c
index 4f8b8ac..fea7f74 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1740,7 +1740,7 @@ SCM_DEFINE (scm_setlocale, "setlocale", 1, 1, 0,
       SCM_SYSERROR;
     }
 
-  enc = locale_charset ();
+  enc = "UTF-8";
 
   /* Set the default encoding for new ports.  */
   scm_i_set_default_port_encoding (enc);
diff --git a/libguile/script.c b/libguile/script.c
index 83daf8a..083891e 100644
--- a/libguile/script.c
+++ b/libguile/script.c
@@ -387,7 +387,7 @@ locale_arguments_to_string_list (int argc, char **const argv)
   SCM lst;
   const char *encoding;
 
-  encoding = environ_locale_charset ();
+  encoding = "UTF-8";
   for (i = argc - 1, lst = SCM_EOL;
        i >= 0;
        i--)
diff --git a/libguile/strings.c b/libguile/strings.c
index 5d0db23..8266247 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -2079,11 +2079,11 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding,
   len = 0;
   enc = encoding;
   if (enc == NULL)
-    enc = "ISO-8859-1";
+    enc = "UTF-8";
   if (scm_i_is_narrow_string (str))
     {
       ret = mem_iconveh (scm_i_string_chars (str), ilen,
-                         "ISO-8859-1", enc,
+                         "UTF-8", enc,
                          (enum iconv_ilseq_handler) handler, NULL,
                          &buf, &len);
 
diff --git a/libguile/strings.c b/libguile/strings.c
index 5c49e33d8..49fa6556e 100644
--- a/libguile/strings.c
+++ b/libguile/strings.c
@@ -1561,7 +1561,7 @@ scm_i_default_string_failed_conversion_handler (void)
 SCM
 scm_from_locale_stringn (const char *str, size_t len)
 {
-  return scm_from_stringn (str, len, locale_charset (),
+  return scm_from_stringn (str, len, "UTF-8",
                            scm_i_default_string_failed_conversion_handler ());
 }
 
@@ -1885,7 +1885,7 @@ char *
 scm_to_locale_stringn (SCM str, size_t *lenp)
 {
   return scm_to_stringn (str, lenp,
-                         locale_charset (),
+                         "UTF-8",
                          scm_i_default_string_failed_conversion_handler ());
 }
 

debug log:

solving f03aaaffe ...
found f03aaaffe in https://yhetil.org/guix-devel/20170717205952.GB2568@jasmine.lan/
found 22771324f in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 22771324f4d68eacec75ac6f18650e30abba3dda	gnu/packages/patches/guile-default-utf8.patch

applying [1/1] https://yhetil.org/guix-devel/20170717205952.GB2568@jasmine.lan/
diff --git a/gnu/packages/patches/guile-default-utf8.patch b/gnu/packages/patches/guile-default-utf8.patch
index 22771324f..f03aaaffe 100644

Checking patch gnu/packages/patches/guile-default-utf8.patch...
Applied patch gnu/packages/patches/guile-default-utf8.patch cleanly.

index at:
100644 f03aaaffe5f723c1c01faeec2516b2d4c1ccafef	gnu/packages/patches/guile-default-utf8.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).