aboutsummaryrefslogtreecommitdiff
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/ports.c b/libguile/ports.c
index 301bc44..b0ea2e6 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -1750,7 +1750,7 @@ scm_ungetc (scm_t_wchar c, SCM port)
   if (pt->encoding != NULL)
     encoding = pt->encoding;
   else
-    encoding = "ISO-8859-1";
+    encoding = "UTF-8";
 
   len = sizeof (result_buf);
   result = u32_conv_to_encoding (encoding,
@@ -2212,7 +2212,7 @@ scm_i_set_port_encoding_x (SCM port, const char *encoding)
   pt = SCM_PTAB_ENTRY (port);
 
   if (encoding == NULL)
-    encoding = "ISO-8859-1";
+    encoding = "UTF-8";
 
   if (pt->encoding != encoding)
     pt->encoding = scm_gc_strdup (encoding, "port");
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
@@ -1576,7 +1576,7 @@ scm_from_locale_string (const char *str)
 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_port_conversion_handler ());
 }
 
@@ -1803,7 +1803,7 @@ char *
 scm_to_locale_stringn (SCM str, size_t *lenp)
 {
   return scm_to_stringn (str, lenp,
-                         locale_charset (),
+                         "UTF-8",
                          scm_i_default_port_conversion_handler ());
 }
 
@@ -2054,7 +2054,7 @@ scm_to_stringn (SCM str, size_t *lenp, const char *encoding,
                         "string contains #\\nul character: ~S",
                         scm_list_1 (str));
 
-  if (scm_i_is_narrow_string (str) && (encoding == NULL))
+  if (scm_i_is_narrow_string (str))
     {
       /* If using native Latin-1 encoding, just copy the string
          contents.  */
@@ -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);
 
--- guile-2.0.9/libguile/ports.c	2013-08-21 11:08:50.000000000 +0200
+++ guile-2.0.9/libguile/ports.c	2013-08-21 11:09:47.000000000 +0200
@@ -2512,7 +2512,7 @@ scm_i_port_iconv_descriptors (SCM port,
       const char *precise_encoding;
 
       if (!pt->encoding)
-        pt->encoding = "ISO-8859-1";
+        pt->encoding = "UTF-8";
 
       /* If the specified encoding is UTF-16 or UTF-32, then make
          that more precise by deciding what byte order to use. */
='2020-12-20 15:48:26 +0100'>2020-12-20gnu: kitty: Update to 0.19.3....* gnu/packages/terminals.scm (kitty): Update to 0.19.3. Tobias Geerinckx-Rice 2020-12-15gnu: Add bootterm....* gnu/packages/terminals.scm (bootterm): New variable. Leo Famulari 2020-12-14gnu: kitty: Re-order inputs and native-inputs alphabetically....* gnu/packages/terminals.scm (kitty)[inputs, native-inputs]: Re-order alphabetically. Nicolas Goaziou 2020-12-14gnu: kitty: Update to 0.19.2....* gnu/packages/terminals.scm (kitty): Update to 0.19.2. [inputs]: Add lcms. Switch to python-wrapper. [arguments]: Merge hard-code-libegl phase in build phase. Change build command. Disable checking for updates. Fix error in tests. Nicolas Goaziou 2020-12-06gnu: Add foot....* gnu/packages/terminals.scm (foot): New public variable. Marius Bakke 2020-11-29gnu: libtermkey: Update to 0.22....* gnu/packages/terminals.scm (libtermkey): Update to 0.22. [arguments]: Add a 'patch-failing-test phase. Tobias Geerinckx-Rice 2020-11-29gnu: libtermkey: Prepare for cross-compilation....* gnu/packages/terminals.scm (libtermkey)[arguments]: Use CC-FOR-TARGET. Tobias Geerinckx-Rice 2020-11-27gnu: alacritty: Embed absolute references to required libraries....* gnu/packages/terminals.scm (alacritty)[arguments]: Rename phase "patch-glutin-libgl-path" to "add-absolute-library-references". Patch in absolute references to LIBXKBCOMMON and WAYLAND libraries. Remove LD_LIBRARY_PATH wrapper. Marius Bakke 2020-11-25gnu: et: Deprecate package....* gnu/packages/terminals.scm (et): Deprecate in favor of eternalterminal. Brett Gilio 2020-11-25gnu: et: Work around recursive module imports....* gnu/packages/ssh.scm (et): Remove. * gnu/packages/terminals.scm (et): Add et. Brett Gilio 2020-11-25gnu: eternalterminal: Update to 6.0.13....* gnu/packages/terminals.scm (eternalterminal): Update to 6.0.13. Brett Gilio 2020-10-27gnu: alacritty: Add search path for 'TERMINFO_DIRS'....* gnu/packages/terminals.scm (alacritty)[native-search-paths]: New field. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Fulbert 2020-10-12gnu: rust-url-2.1: Remove minor version from variable name....* gnu/packages/crates-io.scm (rust-url-2.1): Rename to rust-url-2. Arun Isaac 2020-10-06gnu: libtsm: Remove bundled libxkbcommon header....* gnu/packages/terminals.scm (libtsm)[source]: Snip xkbcommon-keysyms.h. Tobias Geerinckx-Rice 2020-10-06gnu: libtsm: Make all inputs native....* gnu/packages/terminals.scm (libtsm)[inputs]: Move check & libxkbcommon from here… [native-inputs]: …to here. Tobias Geerinckx-Rice 2020-10-05gnu: Move graphics crates to crates-graphics.scm....* gnu/packages/crates-graphics.scm: New module. Move rust-andrew-0.2, rust-ansi-colours-1, rust-ansi-term-0.12, rust-ansi-term-0.11, rust-ansi-term-0.10, rust-aom-sys-0.1, rust-ascii-canvas-2, rust-cgl-0.3, rust-cgl-0.2, rust-cgmath-0.17, rust-cglmath-0.16, rust-core-graphics-0.17, rust-core-video-sys-0.1, rust-dav1d-sys-0.3, rust-euclid-0.20, rust-gfx-0.18, rust-gfx-core-0.9, rust-gfx-device-gl-0.16, rust-gfx-gl-0.6, rust-gif-0.10, rust-gl-0.11, rust-gl-generator-0.14, rust-gl-generator-0.13, rust-gl-generator-0.11, rust-gl-generator-0.10, rust-gleam-0.6, rust-glutin-0.22, rust-glutin-0.21, rust-glutin-egl-sys-0.1, rust-glutin-emscripten-sys-0.1, rust-glutin-gles2-sys-0.1, rust-glutin-glx-sys-0.1, rust-glutin-wayland-sys-0.1, rust-image-0.23, rust-image-0.22, rust-image-0.21, rust-image-0.20, rust-jpeg-decoder-0.1, rust-line-drawing-0.7, rust-lyon-geom-0.14, rust-lyon-path-0.14, rust-osmesa-sys-0.1, rust-piston-0.49, rust-piston-float-1.0, rust-piston-gfx-texture-0.40, rust-piston-graphics-api-version-0.2, rust-piston-shaders-graphics2d-0.3, rust-piston-texture-0.8, rust-piston-viewport-1.0, rust-piston-window-0.105, rust-piston2d-gfx-graphics-0.66, rust-pison2d-graphics-0.35, rust-piston-event-loop-0.49, rust-pistoncore-glutin-window-0.63, rust-pistoncore-input-0.28, rust-pistoncore-window-0.44, rust-png-0.16, rust-png-0.15, rust-png-0.14, rust-png-0.12, rust-raw-window-handle-0.3, rust-resize-0.3, rust-rgb-0.8, rust-smithay-client-toolkit-0.6, rust-smithay-client-toolkit-0.4, rust-smithay-clipboard-0.3, rust-tiff-0.5, rust-tiff-0.3, rust-tiff-0.2, rust-wayland-client-0.23, rust-wayland-client-0.21, rust-wayland-commons-0.23, rust-wayland-commons-0.21, rust-wayland-protocols-0.23, rust-wayland-protocols-0.21, rust-wayland-scanner-0.23, rust-wayland-scanner-0.21, rust-wayland-server-0.23, rust-wayland-server-0.21, rust-wayland-sys-0.23, rust-wayland-sys-0.21, rust-winit-0.20, rust-winit-0.19, rust-x11-2, rust-x11-clipboard-0.4, rust-x11-dl-2, rust-y4m-0.5 to here. * gnu/packages/crates-io.scm: ... from here. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new module. * gnu/packages/crates-io.scm, gnu/packages/crates-gtk.scm, gnu/packages/gnome.scm, gnu/packages/rust-apps.scm, gnu/packages/terminals.scm, gnu/packages/video.scm: Adjust for package movement. Efraim Flashner 2020-10-04gnu: Add go-github-com-junegunn-fzf....* gnu/packages/terminals.scm (go-github-com-junegunn-fzf): Update to 0.22.0. Signed-off-by: Efraim Flashner <efraim@flashner.co.il> HiPhish 2020-09-23gnu: Fix typoes in package descriptions....* gnu/packages/audio.scm (caps-plugins-lv2)[synopsis]: Fix typo. * gnu/packages/bioconductor.scm (r-karyoploter, r-anota, r-gcrma) (r-bigmemoryextras)[description]: Likewise. * gnu/packages/cran.scm (r-geometry)[synopsis]: Likewise. (r-stringdist, r-patchwork, r-depth, r-tea)[description]: Likewise. * gnu/packages/crates-io.scm (rust-assert-fs-0.11, rust-notify-4) (rust-tokio-fs-0.1)[synopsis, description]: Likewise. (rust-blas-sys-0.7)[description]: Likewise. (rust-fs-extra-1.1, rust-xattr-0.2)[synopsis]: Likewise. * gnu/packages/databases.scm (perl-mysql-config)[description]: Likewise. * gnu/packages/disk.scm (hddtemp)[description]: Likewise. * gnu/packages/django.scm (python-djangorestframework)[description]: Likewise. * gnu/packages/documentation.scm (doc++)[description]: Likewise. * gnu/packages/emacs-xyz.scm (emacs-kakoune, emacs-pyim-basedict, eless) (emacs-scpaste)[description]: Likewise. * gnu/packages/file-systems.scm (dbxfs)[description]: Likewise. * gnu/packages/finance.scm (python-stdnum)[description]: Likewise. * gnu/packages/fontutils.scm (woff2)[description]: Likewise. * gnu/packages/games.scm (openttd-opengfx)[description]: Likewise. * gnu/packages/gnome-xyz.scm (gnome-shell-extension-topicons-redux) [description]: Likewise. * gnu/packages/gnome.scm (libgrss)[description]: Likewise. * gnu/packages/golang.scm (go-github-com-mitchellh-reflectwalk) [description]: Likewise. (go-github-com-go-git-go-billy)[synopsis, description]: Likewise. * gnu/packages/haskell-check.scm (ghc-inspection-testing)[description]: Likewise. * gnu/packages/haskell-web.scm (ghc-yesod-form)[description]: Likewise. * gnu/packages/haskell-xyz.scm (ghc-hex)[description]: Likewise. * gnu/packages/hyperledger.scm (hyperledger-iroha-ed25519)[description]: Likewise. * gnu/packages/java.scm (java-mail)[synopsis]: Likewise. (java-native-access-platform)[description]: Likewise. * gnu/packages/kde-frameworks.scm (kactivities-stats)[description]: Likewise. * gnu/packages/kde-utils.scm (krusader)[description]: Likewise. * gnu/packages/language.scm (praat)[description]: Likewise. * gnu/packages/linux.scm (light)[description]: Likewise. * gnu/packages/lisp-xyz.scm (sbcl-hu.dwim.defclass-star)[description]: Likewise. * gnu/packages/mail.scm (dovecot-trees, sieve-connect)[description]: Likewise. * gnu/packages/ocaml.scm (ocaml-opam-file-format, ocaml-cppo) (ocaml4.07-ppx-variants-conv)[description]: Likewise. * gnu/packages/perl.scm (perl-convert-binhex)[description]: Likewise. * gnu/packages/python-crypto.scm (python-ecdsa)[description]: Likewise. * gnu/packages/python-web.scm (python-html5lib)[synopsis, description]: Likewise. (python-venusian)[synopsis]: Likewise. * gnu/packages/python-xyz.scm (python-readlike, python-gssapi) (python-flufl-i18n)[description]: Likewise. (python-pox, python-watchdog, python-xattr)[synopsis, description]: Likewise. * gnu/packages/ruby.scm (ruby-sorcerer)[description]: Likewise. * gnu/packages/rust-apps.scm (watchexec)[description]: Likewise. * gnu/packages/rust.scm (mrustc)[synopsis]: Likewise. * gnu/packages/shells.scm (s-shell)[description]: Likewise. * gnu/packages/ssh.scm (sshpass)[description]: Likewise. * gnu/packages/terminals.scm (beep)[description]: Likewise. * gnu/packages/web.scm (perl-lwp-useragent-cached)[description]: Likewise. * gnu/packages/wv.scm (wv)[description]: Likewise. Tobias Geerinckx-Rice 2020-08-24gnu: libvterm: Update to 0.1.4....* gnu/packages/terminals.scm (libvterm): Update to 0.1.4. Signed-off-by: Leo Famulari <leo@famulari.name> Michael Rohleder 2020-08-10gnu: alacritty: Fix on Wayland....* gnu/packages/terminals.scm (alacritty)[arguments]: Wrap alacritty to find libwayland-client and libxkbcommon. Tobias Geerinckx-Rice 2020-08-09gnu: libvterm: Update to 0.1.3....* gnu/packages/terminals.scm (libvterm): Update to 0.1.3. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Michael Rohleder 2020-08-04gnu: rust-fnv: Don't include minor version in variable name....* gnu/packages/crates-io.scm (rust-fnv-1.0): Rename to... (rust-fnv-1): ...this. Jakub Kądziołka 2020-07-26gnu: rust-serde-json-1.0: Remove minor version from package name....* gnu/packages/crates-io.scm (rust-serde-json-1.0): Rename to rust-serde-json-1. Signed-off-by: Jakub Kądziołka <kuba@kadziolka.net> Alexandru-Sergiu Marton 2020-07-26gnu: rust-serde-1.0: Remove minor version from package name....* gnu/packages/crates-io.scm (rust-serde-1.0): Rename to rust-serde-1. Signed-off-by: Jakub Kądziołka <kuba@kadziolka.net> Alexandru-Sergiu Marton 2020-07-12gnu: Remove ".git" from "https://github/…/….git"....Until now, 'lookup-origin' and thus 'lookup-origin-revision' in (guix swh) would sometimes return #f for these because the ".git" URLs are redirects to the non-".git" URLs. Consequently, 'guix lint -c archival' would keep saying "scheduled Software Heritage archival"; likewise, the fallback download code would fail. * gnu/packages/ada.scm, gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm, gnu/packages/android.scm, gnu/packages/animation.scm, gnu/packages/arcan.scm, gnu/packages/assembly.scm, gnu/packages/audio.scm, gnu/packages/authentication.scm, gnu/packages/avr.scm, gnu/packages/axoloti.scm, gnu/packages/backup.scm, gnu/packages/bash.scm, gnu/packages/benchmark.scm, gnu/packages/bioconductor.scm, gnu/packages/bioinformatics.scm, gnu/packages/bittorrent.scm, gnu/packages/boost.scm, gnu/packages/build-tools.scm, gnu/packages/c.scm, gnu/packages/calendar.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/chemistry.scm, gnu/packages/chez.scm, gnu/packages/clojure.scm, gnu/packages/code.scm, gnu/packages/compression.scm, gnu/packages/compton.scm, gnu/packages/coq.scm, gnu/packages/cpp.scm, gnu/packages/cran.scm, gnu/packages/crypto.scm, gnu/packages/curl.scm, gnu/packages/databases.scm, gnu/packages/datastructures.scm, gnu/packages/debug.scm, gnu/packages/disk.scm, gnu/packages/distributed.scm, gnu/packages/django.scm, gnu/packages/dlang.scm, gnu/packages/dns.scm, gnu/packages/docker.scm, gnu/packages/education.scm, gnu/packages/efi.scm, gnu/packages/elixir.scm, gnu/packages/emacs-xyz.scm, gnu/packages/embedded.scm, gnu/packages/emulators.scm, gnu/packages/engineering.scm, gnu/packages/erlang.scm, gnu/packages/fabric-management.scm, gnu/packages/file-systems.scm, gnu/packages/finance.scm, gnu/packages/firmware.scm, gnu/packages/flashing-tools.scm, gnu/packages/fonts.scm, gnu/packages/fontutils.scm, gnu/packages/fpga.scm, gnu/packages/game-development.scm, gnu/packages/games.scm, gnu/packages/genealogy.scm, gnu/packages/genimage.scm, gnu/packages/geo.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/gnome-xyz.scm, gnu/packages/gnome.scm, gnu/packages/gnuzilla.scm, gnu/packages/golang.scm, gnu/packages/gpodder.scm, gnu/packages/graph.scm, gnu/packages/graphics.scm, gnu/packages/graphviz.scm, gnu/packages/groff.scm, gnu/packages/groovy.scm, gnu/packages/gtk.scm, gnu/packages/guile-xyz.scm, gnu/packages/guile.scm, gnu/packages/hardware.scm, gnu/packages/haskell-apps.scm, gnu/packages/haskell-xyz.scm, gnu/packages/hexedit.scm, gnu/packages/i2p.scm, gnu/packages/ibus.scm, gnu/packages/image-processing.scm, gnu/packages/image-viewers.scm, gnu/packages/image.scm, gnu/packages/ipfs.scm, gnu/packages/java-graphics.scm, gnu/packages/java-maths.scm, gnu/packages/java.scm, gnu/packages/javascript.scm, gnu/packages/jrnl.scm, gnu/packages/julia.scm, gnu/packages/jupyter.scm, gnu/packages/kodi.scm, gnu/packages/language.scm, gnu/packages/lego.scm, gnu/packages/less.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lirc.scm, gnu/packages/lisp-xyz.scm, gnu/packages/llvm.scm, gnu/packages/logging.scm, gnu/packages/lolcode.scm, gnu/packages/lua.scm, gnu/packages/lxde.scm, gnu/packages/lxqt.scm, gnu/packages/machine-learning.scm, gnu/packages/mail.scm, gnu/packages/markup.scm, gnu/packages/maths.scm, gnu/packages/maven.scm, gnu/packages/mes.scm, gnu/packages/messaging.scm, gnu/packages/monitoring.scm, gnu/packages/mpd.scm, gnu/packages/music.scm, gnu/packages/networking.scm, gnu/packages/node-xyz.scm, gnu/packages/ocaml.scm, gnu/packages/ocr.scm, gnu/packages/onc-rpc.scm, gnu/packages/opencl.scm, gnu/packages/opencog.scm, gnu/packages/pantheon.scm, gnu/packages/password-utils.scm, gnu/packages/patchutils.scm, gnu/packages/pdf.scm, gnu/packages/perl6.scm, gnu/packages/phabricator.scm, gnu/packages/popt.scm, gnu/packages/printers.scm, gnu/packages/prolog.scm, gnu/packages/protobuf.scm, gnu/packages/pulseaudio.scm, gnu/packages/python-crypto.scm, gnu/packages/python-web.scm, gnu/packages/python-xyz.scm, gnu/packages/qt.scm, gnu/packages/radio.scm, gnu/packages/rails.scm, gnu/packages/rdf.scm, gnu/packages/rednotebook.scm, gnu/packages/rpc.scm, gnu/packages/rsync.scm, gnu/packages/ruby.scm, gnu/packages/rust.scm, gnu/packages/scheme.scm, gnu/packages/screen.scm, gnu/packages/security-token.scm, gnu/packages/selinux.scm, gnu/packages/serialization.scm, gnu/packages/shells.scm, gnu/packages/shellutils.scm, gnu/packages/simh.scm, gnu/packages/sml.scm, gnu/packages/ssh.scm, gnu/packages/statistics.scm, gnu/packages/stenography.scm, gnu/packages/sync.scm, gnu/packages/syncthing.scm, gnu/packages/synergy.scm, gnu/packages/telephony.scm, gnu/packages/terminals.scm, gnu/packages/tex.scm, gnu/packages/texinfo.scm, gnu/packages/text-editors.scm, gnu/packages/textutils.scm, gnu/packages/time.scm, gnu/packages/tmux.scm, gnu/packages/tor.scm, gnu/packages/toys.scm, gnu/packages/version-control.scm, gnu/packages/video.scm, gnu/packages/vim.scm, gnu/packages/virtualization.scm, gnu/packages/vlang.scm, gnu/packages/vnc.scm, gnu/packages/vpn.scm, gnu/packages/web-browsers.scm, gnu/packages/web.scm, gnu/packages/wireservice.scm, gnu/packages/wm.scm, gnu/packages/wxwidgets.scm, gnu/packages/xdisorg.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, tests/lint.scm: Remove trailing ".git" from 'git-reference' URL. Ludovic Courtès