I’m currently using espose to replace elements in a doc document with their respective values. The elements are identified by the fact that they are enclosed between “«»” characters.
unfortunately it seems that my code doesn’t work when I’m using such characters. could someone help me with this problem? my code is along the lines of
DocHandlerInterface docHandler
…
boolean esito = docHandler.loadDocument(documentAsStream);
…
docHandler.replace("½PROVA╗", "proviamo", false, true);
which fails to replace the string “½PROVA╗”
with “proviamo”, even though replacing the last line with
docHandler.replace("PROVA", "proviamo", false, true);
does correctly result in the string “½proviamo╗”(that is: the replace mechanism works correctly, as long as the chacacters “½╗” are not part of string to be replaced.
Could you help me with this problem? Is it possible to make the replace accept this characters? A search in the forum archives resulted in the thread https://forum.aspose.com/t/106735 with the scary quote " You can’t replace special character. This is by design." but then goes on pointing out that it refers to “paragraph break, cell break, section break, field start, field separator, field end, inline picture, drawing object, footnote” which shouldn’t be the case with my problem