octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64139] fileread doesn't support 'encoding' ar


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #64139] fileread doesn't support 'encoding' argument
Date: Fri, 5 May 2023 12:20:12 -0400 (EDT)

Follow-up Comment #10, bug #64139 (project octave):

The test suite seems to be failing with clang compilers:
E.g.:
https://github.com/gnu-octave/octave/actions/runs/4895045937/jobs/8740091878#step:13:89949

>>>>> processing /home/runner/work/octave/octave/scripts/io/fileread.m
***** error <conversion from codepage 'unknownvalue' not supported>
 fileread ("filename", "Encoding", "UnknownValue")
!!!!! error failed.
Expected <conversion from codepage 'unknownvalue' not supported>, but got
<fileread: cannot open file>


The actual issue might not be clang but libc++ with which conversion of
streams is currently turned off. In that case, `fopen` falls back to "UTF-8"
(with a warning) independent on which encoding was passed to `fopen` iirc.

We'd probably need to run that test only conditionally on `! __have_feature__
("LLVM_LIBCXX")`.
Maybe something along the lines of:

%!testif ; ! __have_feature__ ("LLVM_LIBCXX")
%! fail ('fileread ("filename", "Encoding", "UnknownValue")', ...
%!       "conversion from codepage 'unknownvalue' not supported");


(Currently untested.)



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64139>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]