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

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

[Octave-bug-tracker] [bug #57395] pkg install fails using dev octave 6 i


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #57395] pkg install fails using dev octave 6 if file has different file encoding
Date: Thu, 12 Dec 2019 12:54:07 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Follow-up Comment #6, bug #57395 (project octave):

We still haven't implemented a way to indicate the .m file encoding on a per
file or folder basis. It's only possible to define it globally (using
"__mfile_encoding__").

Installing packages shouldn't fail though imho even if there encoding is
undefined yet (and they contain invalid UTF-8).
Maybe we need to add some calls to __u8_validate__ where necessary.

The following change should allow installing the package:

diff -r d8c53771645c scripts/pkg/private/install.m
--- a/scripts/pkg/private/install.m     Sun Dec 08 22:06:09 2019 +0100
+++ b/scripts/pkg/private/install.m     Thu Dec 12 18:45:46 2019 +0100
@@ -316,7 +316,7 @@
   pkg = "";
   if (fid >= 0)
     while (! feof (fid))
-      ln = fgetl (fid);
+      ln = __u8_validate__ (fgetl (fid));
       if (ln > 0)
         t = regexp (ln, pat, "tokens");
         if (! isempty (t))


With it, I see the following:

>> pkg install -verbose -forge tsa
mkdir (/tmp/oct-fz2SRz)
untar (/home/osboxes/Repositories/Octave/octave-1/.build/tsa-4.6.2.tar.gz,
/tmp/oct-fz2SRz)
make: Entering directory '/tmp/oct-fz2SRz/tsa-4.6.2/src'
make: Nothing to be done for 'mex4o'.
make: Leaving directory '/tmp/oct-fz2SRz/tsa-4.6.2/src'
warning: Invalid UTF-8 byte sequences have been replaced.
warning: called from
    doc_cache_create>create_cache at line 109 column 20
    gen_doc_cache_in_dir>@<anonymous> at line 143 column 18
    doc_cache_create>gen_doc_cache_in_dir at line 144 column 9
    doc_cache_create at line 55 column 12
    install>generate_lookfor_cache at line 810 column 5
    install at line 229 column 7
    pkg at line 477 column 9

warning: Invalid UTF-8 byte sequences have been replaced.
warning: called from
    doc_cache_create>create_cache at line 109 column 20
    gen_doc_cache_in_dir>@<anonymous> at line 143 column 18
    doc_cache_create>gen_doc_cache_in_dir at line 144 column 9
    doc_cache_create at line 55 column 12
    install>generate_lookfor_cache at line 810 column 5
    install at line 229 column 7
    pkg at line 477 column 9

For information about changes from previous versions of the tsa package, run
'news tsa'.



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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