bugGNU Octave - Bugs: bug #49573, version 3.2.4 not displaying...


bug #49573: version 3.2.4 not displaying colors in a terminal

Submitter:  Francisco Vico <nightcod3r>
Submitted:  Thu 10 Nov 2016 04:38:18 PM UTC
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sat 30 Dec 2017 07:22:38 PM UTC, comment #5: 

updated, thanks to both of you !

ederag <ederag>
Thu 10 Nov 2016 07:38:37 PM UTC, comment #4: 

Thanks for being curious! I've contacted the author and this information will help indeed to make the script backward compatible.

Francisco Vico <nightcod3r>
Thu 10 Nov 2016 07:34:18 PM UTC, comment #3: 

Sorry, that should have been "0x33", bad copy/paste.

Mike Miller <mtmiller>
Group Member
Thu 10 Nov 2016 07:33:16 PM UTC, comment #2: 

I couldn't help myself, I was curious, and the relevant change is the one that added support for octal escape sequences in double-quoted strings in version 3.8.0.

In old versions of Octave,

>> "\033" == char ([0, 0x31, 0x31])
ans =

   1   1   1

this double-quoted string contains three characters, a NUL byte, and two 3s.

In recent versions of Octave (starting with 3.8.0), this is parsed as an octal escape sequence. The cprintf.m script you pointed to makes use of this to build its terminal escape sequence strings.

Mike Miller <mtmiller>
Group Member
Thu 10 Nov 2016 06:50:16 PM UTC, comment #1: 

The referenced cprintf script does work in Octave 3.8.2 and newer, so this is not a valid bug report against a current version of Octave.

I'm sorry but if you want to use that script it looks like you will either have to upgrade your version of Octave to something more recent, or debug the script and investigate why it isn't working in 3.6.4 and older, and maybe send a suggestion to the author if you'd like to see it fixed for such ancient versions.

Mike Miller <mtmiller>
Group Member
Thu 10 Nov 2016 04:38:18 PM UTC, original submission:  

In an Xterm(271) (under Ubuntu 12.04) this script:


generates calls to printf, like printf("\033[1;31mtest\n"), but it does not print colored strings (something like cprintf("red","%s\n","test"), will leave the system terminal idle. It works fine in a Xterm(297) on a different system (Ubuntu 14.04). Both terminals were in the default Ubuntu configuration (i.e. '*customization: -color' option included).
According to the current octave documentation, that should work; the release notes for 3.8, 3.6, 3.4 do not mention escape or printf in this regard.

Francisco Vico <nightcod3r>


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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ederag (Posted a comment)
  • -email is unavailable- added by nightcod3r (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-05-12 mtmiller Carbon-CopyRemoved 80942 -
    2016-11-10 mtmiller Open/ClosedOpen Closed
    2016-11-10 mtmiller StatusNone Invalid / Not an Octave Bug

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code