xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

HtmlToAnsi()

Converts an HTML formatted text string to the ANSI character set.

Syntax

HtmlToAnsi( <cHtmlString> ) --> cAnsiString

Arguments

<cHtmlString>
This is a HTML formatted text string.

Return

The function returns a text string converted to the ANSI character set.

Description

Function HtmlToAnsi() removes HTML character entities from <cHtmlString> and returns the text string converted to the ANSI character set. Note that the function processes only HTML character entities (e.g. &gt;, &lt; or &amp;) that are interchangeable in the OEM and ANSI character sets. Refer to AnsiToHtml() for a complete list of HTML character entities recognized by the function.

Info

See also:AnsiToHtml(), HtmlToOem(), OemToHtml(), THtmlDocument()
Category: Conversion functions , HTML functions , xHarbour extensions
Source:tip\thtml.prg
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows a result of HtmlToAnsi()

   PROCEDURE Main
      LOCAL cHtml := 'IF cChr &lt;&gt; "&amp;"'

      ? HtmlToAnsi( cHtml )  // result: IF cChr <> "&"

   RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe