diff --git a/src/mzscheme/src/read.c b/src/mzscheme/src/read.c index e6595bcabf..f21a349b3a 100644 --- a/src/mzscheme/src/read.c +++ b/src/mzscheme/src/read.c @@ -2240,7 +2240,7 @@ read_list(Scheme_Object *port, if (effective_ch == closer) { if (shape == mz_shape_hash_elem) { scheme_read_err(port, stxsrc, startline, startcol, start, SPAN(port, start), ch, indentation, - "read: expected hash pair (with key and value separated by %s) before '%c'", + "read: expected hash pair (with key and value separated by %s) before `%c'", dot_name(params), ch); return NULL; diff --git a/src/mzscheme/src/string.c b/src/mzscheme/src/string.c index 3f6b57e550..5dd320dcd2 100644 --- a/src/mzscheme/src/string.c +++ b/src/mzscheme/src/string.c @@ -4075,11 +4075,14 @@ Scheme_Object *scheme_open_converter(const char *from_e, const char *to_e) if (!iconv_ready) init_iconv(); + if (!*to_e || !*from_e) + reset_locale(); + if ((!strcmp(from_e, "UTF-8") || !strcmp(from_e, "UTF-8-permissive") - || (!*from_e && mzLOCALE_IS_UTF_8(from_e))) + || (!*from_e && mzLOCALE_IS_UTF_8(current_locale_name))) && (!strcmp(to_e, "UTF-8") - || (!*to_e && mzLOCALE_IS_UTF_8(to_e)))) { + || (!*to_e && mzLOCALE_IS_UTF_8(current_locale_name)))) { /* Use the built-in UTF-8<->UTF-8 converter: */ kind = mzUTF8_KIND; if (!strcmp(from_e, "UTF-8-permissive"))