Re: escaping £ signs

"Arnaud Desitter" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
"£" is a valid character in "latin1". You can try "ascii".
Failing that, you will have to modify tidy to suit your own needs.
Regards,

On 21/04/2008, Prab Sohal <[email protected]> wrote:
>
> Hi Guys,
>
> I am trying to escape "£" signs using HTMLTidy. I am looking to use Tidy within a Windows service which processes text files.
>
> My settings are as follows:
>
> Tidy.Document doc = new Tidy.DocumentClass();
>                  doc.SetOptValue(Tidy.TidyOptionId.TidyDoctype, "auto");
>                  doc.SetOptValue(Tidy.TidyOptionId.TidyQuiet, "true");
>                  doc.SetOptValue(Tidy.TidyOptionId.TidyAsciiChars, "true");
>                  doc.SetOptValue(Tidy.TidyOptionId.TidyNumEntities, "true");
>                  doc.SetOptValue(Tidy.TidyOptionId.TidyOutCharEncoding, "latin1");                                                       doc.ParseString(content);
>                  doc.CleanAndRepair();
>
> Currently this is not escaping £ signs (and possibly other currency).
>
> Thanks in advance for your assistance.
>
>
> Prab Sohal
>
>
>      __________________________________________________________
> Sent from Yahoo! Mail.
> A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
> --0-1659731046-1208782588:9071
> Content-Type: text/html; charsetiso-8859-1
> Content-Transfer-Encoding: quoted-printable
>
> <html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Calibri size=3>Hi Guys,</FONT></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face=Calibri size=3> </FONT></o:p></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Calibri size=3>I am trying to escape "£" signs using HTMLTidy. I am looking to use Tidy within a Windows service which processes text files. </FONT></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=Calibri size=3> </FONT></o:p></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Calibri size=3>My settings are as follows:</FONT></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=Calibri size=3> </FONT></o:p></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt 72pt; TEXT-INDENT: 36pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'">Tidy.Document doc = <SPAN style="COLOR: blue">new</SPAN> Tidy.DocumentClass();<o:p></o:p></SPAN></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 3">                  </SPAN>doc.SetOptValue(Tidy.TidyOptionId.TidyDoctype, "auto");<o:p></o:p></SPAN></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 3">                  </SPAN>doc..SetOptValue(Tidy.TidyOptionId.TidyQuiet, "true");<o:p></o:p></SPAN></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 3">                  </SPAN>doc.SetOptValue(Tidy.TidyOptionId.TidyAsciiChars, "true");<o:p></o:p></SPAN></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 3">                  </SPAN>doc.SetOptValue(Tidy.TidyOptionId.TidyNumEntities, "true");<o:p></o:p></SPAN></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 3">                  </SPAN>doc.SetOptValue(Tidy.TidyOptionId..TidyOutCharEncoding, "latin1");<SPAN style="mso-tab-count: 2">       </SPAN><SPAN style="mso-tab-count: 8">                                                </SPAN>doc.ParseString(content);<SPAN style="COLOR: green"><o:p></o:p></SPAN></SPAN></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"><SPAN style="mso-tab-count: 3">                  </SPAN>doc.CleanAndRepair();</SPAN></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=Calibri size=3> </FONT></o:p></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Calibri size=3>Currently this is not escaping £ signs (and possibly other currency).</FONT></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><o:p><FONT face=Calibri size=3> </FONT></o:p></P>
> <P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><FONT face=Calibri size=3>Thanks in advance for your assistance.</FONT></P>
> <DIV> </DIV>
> <DIV> </DIV>
> <DIV>Prab Sohal</DIV></div><br>
>
>
>
>      <hr size=1>
> Sent from <a
> href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=52418/*http://uk.docs.yahoo.com/nowyoucan.html" target=_blank>Yahoo! Mail</a>.
> <br>
> A Smarter Email.</body></html>
> --0-1659731046-1208782588:9071--
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.