diff options
author | Mark H Weaver <mhw@netris.org> | 2013-04-05 17:33:03 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2013-04-07 10:11:41 -0400 |
commit | e1966d0e214b0967c19da71b235196adb057d2b5 (patch) | |
tree | caace4ea783d0b95148acf8aeb37071c2a3498a0 /libguile/read.c | |
parent | 9a334eb3ab6bbb250d9c0f559b82d1c97f5eb21a (diff) |
Remove byte-order mark check from 'scm_i_scan_for_encoding'.
* libguile/read.c (scm_i_scan_for_encoding): Remove byte-order mark
check.
Diffstat (limited to 'libguile/read.c')
-rw-r--r-- | libguile/read.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/libguile/read.c b/libguile/read.c index 64b55c3e5..e2e2e4a2e 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -1986,7 +1986,6 @@ scm_i_scan_for_encoding (SCM port) char header[SCM_ENCODING_SEARCH_SIZE+1]; size_t bytes_read, encoding_length, i; char *encoding = NULL; - int utf8_bom = 0; char *pos, *encoding_start; int in_comment; @@ -2031,10 +2030,6 @@ scm_i_scan_for_encoding (SCM port) scm_seek (port, scm_from_int (0), scm_from_int (SEEK_SET)); } - if (bytes_read > 3 - && header[0] == '\xef' && header[1] == '\xbb' && header[2] == '\xbf') - utf8_bom = 1; - /* search past "coding[:=]" */ pos = header; while (1) @@ -2103,11 +2098,6 @@ scm_i_scan_for_encoding (SCM port) /* This wasn't in a comment */ return NULL; - if (utf8_bom && c_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))); - return encoding; } |