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

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

[Octave-bug-tracker] [bug #49685] Set .m file encoding on a per-director


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #49685] Set .m file encoding on a per-directory basis
Date: Fri, 18 Sep 2020 11:59:26 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36 Edg/85.0.564.51

Update of bug #49685 (project octave):

                  Status:               Confirmed => Patch Submitted        

    _______________________________________________________

Follow-up Comment #9:

The attached patch adds the function dir_encoding (DIR, ENCODING) that can be
used to override the mfile encoding setting for a certain directory.

I did some preliminary tests with a UTF-8 encoded script containing some
non-ASCII characters:

>> tst_umlaut

Test mit Umlauten: äöüß
>> a=dir_encoding('.', 'iso8859-1')

a = utf-8
>> clear tst_umlaut

>> tst_umlaut

Test mit Umlauten: äöüÃ


It might be necessary to add some tilde expand, file name canonicalization or
other things necessary to get reliable file paths.
It probably also needs some logic for +namespaces, @class and private
folders.
But it should be ready for some initial tests.

Feedback e.g. about the function interface would be very welcome.

(file #49809)
    _______________________________________________________

Additional Item Attachment:

File name: bug49685_dir_encoding.patch    Size:7 KB
   
<https://file.savannah.gnu.org/file/bug49685_dir_encoding.patch?file_id=49809>



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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