8000
Skip to content

get_char/2, peek_char/2 missing error #3416

Description

@UWN
?- open(f,write,S,[type(binary)]),put_byte(S,0xff),close(S). % f : file with invalid UTF-8
   S = '$dropped_value'
|  S = ... . % another value would be just as fine
?- open(f,read,S),peek_char(S,C).
   S = '$stream'(0x55d200e3b390), C = end_of_file, unexpected.
   representation_error(character). % expected, but not found
?- open(f,read,S),get_char(S,C).
   error(syntax_error(invalid_data),get_char/2), unexpected.
   representation_error(character). % expected, but not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0