Home » U++ Library support » RichText,QTF,RTF... » String EncodeHtml (how to understand the vast majority of parameters of this function?)
Re: String EncodeHtml [message #58737 is a reply to message #58735] |
Thu, 11 August 2022 14:45   |
BetoValle
Messages: 204 Registered: September 2020 Location: Brasil Valinhos SP
|
Experienced Member |
|
|
Hi jjacksonRIAB!
Tanks! your recommendation is very good. Every theory with a good example becomes clearer to help understanding!
CONSOLE_APP_MAIN
{
String x2 = "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\froman\\fprq2\\fcharset0 Times New Roman;}{\\f1\\fswiss\\fprq2\\fcharset0 Arial;}}";
x2 += "\\viewkind4\\uc1\\pard\\lang1046\\f0\\fs24 Refere que teve mal estar e n\\'e3o conseguia dormir com Amitriptilina, Terminou gabapentina 900 mg 2X/dia. ";
x2 += "\\par Exames :Vit D= 47,4 e PTH= 47 calcemia= 9,1; ";
x2 += "\\par \\trowd\\trgaph70\\trleft-15\\cellx592\\cellx1552\\cellx1972\\cellx2792\\cellx3172\\pard\\intbl\\f1\\fs20 DMO\\cell 2009\\cell %\\cell 2011\\cell %\\cell\\f0\\row";
x2 += "\\f1\\trowd\\trgaph70\\trleft-15\\cellx592\\cellx1552\\cellx1972\\cellx2792\\cellx3172\\intbl L1\\cell 0,824\\cell 73\\cell 0,79\\cell 70\\cell\\f0\\row";
x2 += "\\f1\\trowd\\trgaph70\\trleft-15\\cellx592\\cellx1552\\cellx1972\\cellx2792\\cellx3172\\intbl L2\\cell 0,858\\cell 71\\cell 0,922\\cell 77\\cell\\f0\\row";
x2 += "\\f1\\trowd\\trgaph70\\trleft-15\\cellx592\\cellx1552\\cellx1972\\cellx2792\\cellx3172\\intbl L3\\cell 0,904\\cell 75\\cell 0,914\\cell 76\\cell\\f0\\row";
x2 += "\\f1\\trowd\\trgaph70\\trleft-15\\cellx592\\cellx1552\\cellx1972\\cellx2792\\cellx3172\\intbl L4\\cell 0,861\\cell 72\\cell 0,89\\cell 74\\cell\\f0\\row";
x2 += "\\f1\\trowd\\trgaph70\\trleft-15\\cellx592\\cellx1552\\cellx1972\\cellx2792\\cellx3172\\intbl colo\\cell 0,671\\cell 68\\cell 0,667\\cell 64\\cell\\f0\\row";
x2 += "\\f1\\trowd\\trgaph70\\trleft-15\\cellx592\\cellx1552\\cellx1972\\cellx2792\\cellx3172\\intbl troc\\cell 0,749\\cell 95\\cell 0,515\\cell 61\\cell\\f0\\row";
x2 += "\\pard\\fs24 RX= desmineraliza\\'e7\\'e3o \\'f3ssea localizada em grande trocanter, sem les\\'f4es l\\'edticas.";
x2 += "\\par Cd=Manter Actonel 150. Depura 5 gotas por dia. oscal 2X/dia + Gabapentina 900mg 2X/dia. Manter Amitriptilina 25 mg pela manh\\'e3. ";
x2 += "\\par";
x2 += "\\par }";
RichText rt2 = ParseRTF ( x2 );
Index<String> css2;
const VectorMap<String, String> links2;
VectorMap<String, String> labels2;
HtmlObjectSaver saver2;
String y = EncodeHtml ( rt2, css2, links2, labels2, saver2 );
Cout() << "------------------result---------------" << EOL;
Cout() << y << EOL;
Cout() << "------------------CSS------------------" << EOL;
Cout() << AsCss(css2);
}
rtf format reference
-
Attachment: demo.png
(Size: 131.70KB, Downloaded 173 times)
|
|
|
Goto Forum:
Current Time: Sun May 11 07:01:15 CEST 2025
Total time taken to generate the page: 0.00358 seconds
|