fix handling of empty string as encoding name
svn: r4015
This commit is contained in:
parent
ad6ac0eb57
commit
4aa398ef7c
|
@ -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;
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user