bugGNU Octave - Bugs: bug #40750, gl2ps output for svg format does...

 
 

bug #40750: gl2ps output for svg format does not correctly map special characters

Submitter:  Muhali <muhali>
Submitted:  Fri 29 Nov 2013 03:20:19 PM UTC
   
 
Category:  Plotting with OpenGL Severity:  2 - Minor
Priority:  1 - Later Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 21 Oct 2017 11:57:23 AM UTC, comment #9: 

This bug has been fixed with this cset:

http://hg.savannah.gnu.org/hgweb/octave/rev/1b7e49a72c62

Octave now writes svg text elements itself and takes care of special characters. Closing report as fixed.

Pantxo Diribarne <pantxo>
Group Member
Fri 25 Nov 2016 10:24:41 PM UTC, comment #8: 

This issue is still present in Octave 4.2.0 (fltk and qt plotting).

Code to solve this isse has been posted in comment #7.

Hartmut <hardy>
Mon 30 Jun 2014 04:01:16 PM UTC, comment #7: 

Although they may want to introduce complex filtering, and for all stream types like postscript, pdf, svg, that is not what we are proposing.  We just want a stream filter for the case of svg output and the 5 replacement strings mentioned.

Maybe we should just do it ourselves by searching/replacing in Octave on the svg file generated by gl2ps.  Attached is an m-file that does this and could be incorporated into the print function.



(file #31645)

Rik <rik5>
Group administrator
Mon 30 Jun 2014 10:55:42 AM UTC, comment #6: 

The response for GL2PS development is below.


We currently don't filter the text passed to gl2psText. Not sure if we should: in this case we should also escape other characters for LaTeX and PostScript?.



Ben Abbott <bpabbott>
Group Member
Tue 13 May 2014 12:41:53 AM UTC, comment #5: 

I submitted a bug report for gl2ps

https://geuz.org/trac/gl2ps/ticket/10


Ben Abbott <bpabbott>
Group Member
Sun 11 May 2014 12:25:59 AM UTC, comment #4: 

I think the TeX stuff is something that Octave probably has to translate.  We already do something similar for the OpenGL renderer where we take the text, such as '\beta', and translate it to a Unicode point.

So, I would definitely file a bug with the 5 replacements that you identified.

Rik <rik5>
Group administrator
Sat 10 May 2014 12:47:16 AM UTC, comment #3: 

Given SVG is XML based, should this bug report be expanded to include all the TeX stuff?

Ben Abbott <bpabbott>
Group Member
Sat 10 May 2014 12:25:36 AM UTC, comment #2: 

I notice that this bug hasn't been reported up stream. The bug tracker for gl2ps is at the link below.

https://geuz.org/trac/gl2ps/report/6

What characters are involved?  More than the list below?


<        &lt;
>        &gt;
'        &apos;
"        &quot;
&        &amp;


Ben

Ben Abbott <bpabbott>
Group Member
Mon 06 Jan 2014 05:01:23 PM UTC, comment #1: 

Octave uses the gl2ps package internally to generate svg format.  This seems to be a bug in gl2ps which should be filed upstream with that package.

In the near term you could write a Perl script to search and replace malformed special characters with correct svg output.

Rik <rik5>
Group administrator
Fri 29 Nov 2013 03:20:19 PM UTC, original submission:  

Doing


graphics_toolkit fltk
text(0, 0, "<")
print foo.svg


does not produce valid svg as the "<" is not converted to "&lt;".

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #31645:  svg_rep.m added by rik5 (915B - d2l/unknowntype)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by bpabbott (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by muhali (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 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-21 pantxo StatusPostponed Fixed
        Open/ClosedOpen Closed
    2016-02-22 mtmiller StatusInvalid / Not an Octave Bug Postponed
    2014-06-30 rik5 Attached File- Added svg_rep.m, #31645
    2014-04-28 rik5 Priority3 - Low 1 - Later
        StatusConfirmed Invalid / Not an Octave Bug
    2014-01-06 rik5 Summaryprinting HTML Entities for svg gl2ps output for svg format does not correctly map special characters
    2014-01-06 rik5 Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code