find and delete a bad rtf /code tag?

  • After importing many files, I find that there is a code in the raw rtf that is not recognized and I would like to locate and delete or replace the code in the raw file. I am not sure how the best way to do this is. I could just open the file in a tmemo and do the seach and replace, but the file is already loaded in to a wprichtext, so I would have to close it, open in memo, then reopen in wprichtext all in code.
    Is there a way to do this directly from the wprichtext componenet?
    The code that appears in the rtf is /endash and it displays in the wprichtext as an object. I need to just change it to a - (hyphen)
    Advice please.
    -d

    \f2 It started 4 years ago with our \u8220 ?Plan to Win\u8221 ? /endash you may know them as

    needs to be changed to

    \f2 It started 4 years ago with our \u8220 ?Plan to Win\u8221 ? - you may know them as

    in order for the file to desplay correctly.

    • Offizieller Beitrag

    Hi,

    I suggest to change the reader to avoid creating an object for /endash.

    WPIOReadRTF

    insead of

    1: //endash
    PrintTextObj(wpobjTextObject, 'UNICODEC', '', false, false, false).CParam := 2013;

    It should do

    PrintAChar('-');