bugGNU Octave - Bugs: bug #49685, Change default codepage of text...


bug #49685: Change default codepage of text editor to UTF-8 on Windows

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Wed 23 Nov 2016 06:21:14 PM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 09 Mar 2019 12:04:20 PM UTC, comment #4: 

Here's one more edge case: Octave's BISTs can be defined in C++ *.cc source files in special %! lines inside C++ comments. How should they be interpreted?

E.g. prospective patch http://hg.savannah.gnu.org/hgweb/octave/rev/ccea3574f36b contains a test with "abc,äöü" strings.

Andrew Janke <apjanke>
Tue 05 Mar 2019 05:11:34 AM UTC, comment #3: 

Here's an alternative, if more complicated, idea that could support both use cases:

How about adding support for an explicit encoding indicator stored in a ".encoding" file in source code directories? For source files under dirs with an explicit encoding, that encoding would always be used for those files, regardless of what the Text Editor default encoding is. Then leave the Text Editor default encoding as System on Windows. (This would affect both the Text Editor and Octave's M-code interprerter.)

That way Windows Octave and Windows Matlab projects without explicit encodings would be compatible (as long as they're used on machines with the same system locale). And Octave-only projects that needed cross-OS or cross-locale portability could be given .encoding files (and use UTF-8).

Octave's core files and Octave Forge packages would all get UTF-8 .encoding files so they're portable.

See my big long post at http://lists.gnu.org/archive/html/octave-maintainers/2019-03/msg00019.html.

It's a bummer that this approach requires explicit action on the part of the user to achieve portability. But I think this might be necessary if you want both cross-OS/locale and with-Matlab compatibility.

Andrew Janke <apjanke>
Wed 23 Nov 2016 09:18:33 PM UTC, comment #2: 

See also bug #45597. I find it hard to decide what is the more important usecase for Windows Octave:

  • exchange m-files with Windows Matlab (That's why the default encoding in Windows is currently "system". That's "my" usecase.)
  • exchange m-files with Linux Octave, or with Windows Octave of other locales (proposal in this bug report, could be best covered with "utf8" encoding).
Hartmut <hardy>
Wed 23 Nov 2016 06:26:06 PM UTC, comment #1: 

Attached is a patch that makes the proposed change.

(file #39059)

Markus Mützel <mmuetzel>
Project Member
Wed 23 Nov 2016 06:21:14 PM UTC, original submission:  

Octave has a hard life with respect to international (non-ASCII) characters on Windows and there are a lot of (partly overlapping) open bug reports covering many different issues.
It would make things easier if we used only one encoding consistently all over Octave.

At the moment, the standard encoding for the text editor is set to "System" on Windows. That points to a lot of different codepages dependent on the locale of Windows (and its standard codepage). UTF-8 is the default codepage on non-Windows systems. This makes it difficult to exchange Octave files containing non-ASCII characters between different platform (or different locales of Windows).

UTF-8 can be used to encode any glyph that is available in Unicode.
Can we also make it the default on Windows?

Markus Mützel <mmuetzel>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #39059:  bug49685_editor_default_codepage.patch added by mmuetzel (865B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by apjanke (Posted a comment)
  • -email is unavailable- added by apjanke (Add myself to CC list)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by mmuetzel (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-05 apjanke Carbon-Copy- => Added floss@apjanke.net
    2016-11-23 mmuetzel Attached File- => Added bug49685_editor_default_codepage.patch, #39059

    Back to the top

    Powered by Savane 3.5