Detecting HTML vs plain text

  • Julian

    I think you need a bit more work on detecting when something is HTML or not. The problem is I can't see just what can be done.

    If you look at the plain text below WPTools 6 thinks this is HTML and zaps the CRLF.

    Zitat

    I'm using D2007, DBAdvGrid (V. 2.1.9.3) with Firebird V. 2.1.1

    In my Dataset there are data stored with HTML-settings like

    txthtml:='<B>'+txt1+', '+txt2+' '+txt3+'</B><BR><BR>Cust.-No.: '+txt4;

    The first row of the html-text is diplayed correct (in bold letters) but
    I can't see the second row (or more rows...). That means in all
    grid-rows you just see the first row of the html formatted text.

    So how can I tell the DBAdvGrid so autosize the rows generally that all
    text is always displayed?

    • Offizieller Beitrag

    Hi,

    If you need ANSI please set the format string to "ANSI", in this case use property TextLoadFormat.

    Use "HTML-usecr" if you want to read HTML and still use crnl.

    To me it seems quite resonable that here HTML is detected.

    Of course You can also "hack" the unit WPIOHTML to change the detection.

    Kind Regards,
    Julian Ziersch

  • I agree that its reasonable for WPTools to think its html which is why my comment about I can't suggest anything. Unfortunately in this case its also wrong.

    I really wish I could think of a foolproof way of detecting html vs plain text.