mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
Remove byte-order mark check from 'scm_i_scan_for_encoding'.
* libguile/read.c (scm_i_scan_for_encoding): Remove byte-order mark check.
This commit is contained in:
parent
9a334eb3ab
commit
e1966d0e21
1 changed files with 0 additions and 10 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue