Uncommented the code that generates an error when UTF-32 BOMs are detected.

This commit is contained in:
Paulo Moura 2010-10-27 17:33:48 +01:00
parent 168e084c62
commit f3efdff878
1 changed files with 7 additions and 8 deletions

View File

@ -2802,14 +2802,13 @@ p_open (void)
(needs_bom || (st->status & Seekable_Stream_f))) { (needs_bom || (st->status & Seekable_Stream_f))) {
if (!check_bom(sno, st)) if (!check_bom(sno, st))
return FALSE; return FALSE;
/* if (st->encoding == ENC_ISO_UTF32_BE) {
if (st->encoding == ENC_ISO_UTF32_BE || Yap_Error(DOMAIN_ERROR_STREAM_ENCODING, ARG1, "UTF-32 (BE) stream encoding unsupported");
st->encoding == ENC_ISO_UTF32_LE) return FALSE;
{ } else if (st->encoding == ENC_ISO_UTF32_LE) {
Yap_Error(DOMAIN_ERROR_STREAM_ENCODING, ARG1, "unsupported stream encoding"); Yap_Error(DOMAIN_ERROR_STREAM_ENCODING, ARG1, "UTF-32 (LE) stream encoding unsupported");
return FALSE; return FALSE;
} }
*/
} }
st->status &= ~(Free_Stream_f); st->status &= ~(Free_Stream_f);
return (Yap_unify (ARG3, t)); return (Yap_unify (ARG3, t));