bugGNU TeXmacs - Bugs: bug #40742, Invalid conversion of < and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #40742: Invalid conversion of < and > characters in output from R

Submitted by:  Joris van der Hoeven <vdhoeven>
Submitted on:  Thu 28 Nov 2013 10:49:58 PM UTC  
 
Category: ConversionPriority: 5 - Normal
Item Group: ErrorStatus: Fixed
Privacy: PublicAssigned to: Francois Poulain <fpoulain>
Originator Name: Open/Closed: Closed
Release: Release: None
Fixed Release: NoneFixed Release: 
Keywords: 

Fri 29 Nov 2013 01:24:39 PM UTC, comment #3:

Ok, I fixed this in rev 7951.

Francois Poulain <fpoulain>
Project MemberIn charge of this item.
Fri 29 Nov 2013 09:40:17 AM UTC, comment #2:

I am fine with a heuristic detection of the encoding being used, but whether you detect plain ascii, utf-8, or whatever else,
the final conversion to the TeXmacs encoding should be correct. In particular, '<' and '>' should be converted into '<less>' and '<gtr>'. So I think that something is incorrect in the converter for the encoding that you detected.

The verbatim->texmacs conversion has changed a lot in the past. I think that it worked correctly for most of the time, and that it was broken for long periods as well.

There is no urgent need for a validity check at the end, but it has to be made sure that for all supported encodings, '<' and '>' are converted into '<less>' and '<gtr>'.

Joris van der Hoeven <vdhoeven>
Project Administrator
Fri 29 Nov 2013 08:49:05 AM UTC, comment #1:

> I do not understand what this encoding is supposed to do.


"auto" means "detect heuristically if it is pure ascii, utf8 or locale 8 bit charset", implemented via a crible detection in wencoding.cpp. I replaced it in the revision 7267, because it supposed "utf-8" but this was not true all the time.

> In any case, on exit, we should always have a valid TeXmacs string (with only matching '<' and '>' entities).


Anyway, i) the "write (verbatim_to_tree (buf))" line was here before I change anything, ii) the verbatim import is broken with respect to angle brackets (try e.g. (verbatim-snippet->texmacs "hip < hop") in a scheme session).

I will fix the verbatim import.

If needed, I can write a routine ensuring that only valid TeXmacs string are converted to TeXmacs trees at generic->texmacs level (i.e. by escaping non matching '<' entities).

Francois Poulain <fpoulain>
Project MemberIn charge of this item.
Thu 28 Nov 2013 10:49:58 PM UTC, original submission:

Certain commands in the R plug-in induce '<' and '>' symbols to be output in a 'verbatim' stream. For instance,

demo(T.nlm)

does this. Lots of things have changed in the way verbatim strings are converted to TeXmacs, but something seems to go wrong here. More specifically, we seem to be using the "auto" encoding, as specified in the line

write (verbatim_to_tree (buf, false, "auto"));

of verbatim_flush. I do not understand what this encoding is supposed to do. In any case, on exit, we should always have a valid TeXmacs string (with only matching '<' and '>' entities).

Joris van der Hoeven <vdhoeven>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by vdhoeven (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 29 Nov 2013 01:24:39 PM UTCfpoulainStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1