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

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

[Octave-bug-tracker] [bug #57107] regexp functions fail on ISO-8859 inpu


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #57107] regexp functions fail on ISO-8859 input
Date: Fri, 25 Oct 2019 12:02:23 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

Follow-up Comment #16, bug #57107 (project octave):

I just checked in a patch for bug #55452. With it, I can do the following to
read the file from comment #0:

f = fopen('ISO-8859.csv', 'r', 'n', 'iso-8859-1');
str = fgets(f);
str(end) = '';
fclose(f);

regexprep(str, '1', '2')


The output is:

ans =   2T2(°C)  
>> double(str)
ans =

    32    32    49    84    49    40   194   176    67    41    32    32


Should we make this bug about choosing a fallback option for invalid UTF-8 so
that specifying the input encoding isn't necessary for files encoded in
ISO-8859-1?


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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