xHarbour Reference Documentation > Function Reference xHarbour Developers Network  

AnsiToHtml()

Inserts HTML character entities into an ANSI text string,

Syntax

AnsiToHtml( <cAnsiString> ) --> cHtmlString

Arguments

<cAnsiString>
This is an ANSI character string.

Return

The function returns a HTML formatted text string.

Description

Function AnsiToHtml() inserts HTML character entities into <cAnsiString> and returns the HTML formatted text string. 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.

The following table lists all HTML character entities recognized by the function.

HTML character entities.
CharacterHTML entityDescription
&&amp;ampersand
<&lt;less-than sign
>&gt;greater-than sign
¢&cent;cent sign
£&pound;pound sign
¥&yen;yen sign
¦&brvbar;broken bar
§&sect;section sign
©&copy;copyright sign
®&reg;registered sign
°&deg;degree sign
¿&iquest;inverted question mark
À&Agrave;Latin capital letter a with grave
Á&Aacute;Latin capital letter a with acute
Â&Acirc;Latin capital letter a with circumflex
Ã&Atilde;Latin capital letter a with tilde
Ä&Auml;Latin capital letter a with diaeresis
Å&Aring;Latin capital letter a with ring above
Æ&AElig;Latin capital letter ae
Ç&Ccedil;Latin capital letter c with cedilla
È&Egrave;Latin capital letter e with grave
É&Eacute;Latin capital letter e with acute
Ê&Ecirc;Latin capital letter e with circumflex
Ë&Euml;Latin capital letter e with diaeresis
Ì&Igrave;Latin capital letter i with grave
Í&Iacute;Latin capital letter i with acute
Î&Icirc;Latin capital letter i with circumflex
Ï&Iuml;Latin capital letter i with diaeresis
Ð&ETH;Latin capital letter eth
Ñ&Ntilde;Latin capital letter n with tilde
Ò&Ograve;Latin capital letter o with grave
Ó&Oacute;Latin capital letter o with acute
Ô&Ocirc;Latin capital letter o with circumflex
Õ&Otilde;Latin capital letter o with tilde
Ö&Ouml;Latin capital letter o with diaeresis
Ø&Oslash;Latin capital letter o with stroke
Ù&Ugrave;Latin capital letter u with grave
Ú&Uacute;Latin capital letter u with acute
Û&Ucirc;Latin capital letter u with circumflex
Ü&Uuml;Latin capital letter u with diaeresis
Ý&Yacute;Latin capital letter y with acute
Þ&THORN;Latin capital letter thorn
ß&szlig;Latin small letter sharp s (German Eszett)
à&agrave;Latin small letter a with grave
á&aacute;Latin small letter a with acute
â&acirc;Latin small letter a with circumflex
ã&atilde;Latin small letter a with tilde
ä&auml;Latin small letter a with diaeresis
å&aring;Latin small letter a with ring above
æ&aelig;Latin lowercase ligature ae
ç&ccedil;Latin small letter c with cedilla
è&egrave;Latin small letter e with grave
é&eacute;Latin small letter e with acute
ê&ecirc;Latin small letter e with circumflex
ë&euml;Latin small letter e with diaeresis
ì&igrave;Latin small letter i with grave
í&iacute;Latin small letter i with acute
î&icirc;Latin small letter i with circumflex
ï&iuml;Latin small letter i with diaeresis
ð&eth;Latin small letter eth
ñ&ntilde;Latin small letter n with tilde
ò&ograve;Latin small letter o with grave
ó&oacute;Latin small letter o with acute
ô&ocirc;Latin small letter o with circumflex
õ&otilde;Latin small letter o with tilde
ö&ouml;Latin small letter o with diaeresis
ø&oslash;Latin small letter o with stroke
ù&ugrave;Latin small letter u with grave
ú&uacute;Latin small letter u with acute
û&ucirc;Latin small letter u with circumflex
ü&uuml;Latin small letter u with diaeresis
ý&yacute;Latin small letter y with acute
þ&thorn;Latin small letter thorn
ÿ&yuml;Latin small letter y with diaeresis
ˆ&circ;modifier letter circumflex accent
˜&tilde;small tilde

Info

See also:HtmlToAnsi(), 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 AnsiToHtml()

   PROCEDURE Main
      LOCAL cText := 'Copyright © 2007 xHarbour Inc'

      ? AnsiToHtml( cText )  // result: Copyright &copy; 2007 xHarbour Inc

   RETURN

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