Use 'strcasecmp' to compare encoding names.

Reported by Ludovic Courtès <ludo@gnu.org>.

* libguile/ports.c (scm_new_port_table_entry,
  scm_i_set_default_port_encoding, scm_i_set_port_encoding_x):
  libguile/read.c (scm_i_scan_for_encoding): Use 'strcasecmp' to compare
  encoding names.
This commit is contained in:
Mark H Weaver 2013-04-03 13:26:01 -04:00
commit 7290de89fb
2 changed files with 6 additions and 6 deletions

View file

@ -2102,7 +2102,7 @@ scm_i_scan_for_encoding (SCM port)
/* This wasn't in a comment */
return NULL;
if (utf8_bom && strcmp(encoding, "UTF-8"))
if (utf8_bom && strcasecmp(encoding, "UTF-8"))
scm_misc_error (NULL,
"the port input declares the encoding ~s but is encoded as UTF-8",
scm_list_1 (scm_from_locale_string (encoding)));