xHarbour Reference Documentation > Function Reference |
Inserts HTML character entities into an ANSI text string,
AnsiToHtml( <cAnsiString> ) --> cHtmlString
The function returns a HTML formatted text string.
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. >, < or &) 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.
Character | HTML entity | Description |
---|---|---|
& | & | ampersand |
< | < | less-than sign |
> | > | greater-than sign |
¢ | ¢ | cent sign |
£ | £ | pound sign |
¥ | ¥ | yen sign |
¦ | ¦ | broken bar |
§ | § | section sign |
© | © | copyright sign |
® | ® | registered sign |
° | ° | degree sign |
¿ | ¿ | inverted question mark |
À | À | Latin capital letter a with grave |
Á | Á | Latin capital letter a with acute |
 |  | Latin capital letter a with circumflex |
à | à | Latin capital letter a with tilde |
Ä | Ä | Latin capital letter a with diaeresis |
Å | Å | Latin capital letter a with ring above |
Æ | Æ | Latin capital letter ae |
Ç | Ç | Latin capital letter c with cedilla |
È | È | Latin capital letter e with grave |
É | É | Latin capital letter e with acute |
Ê | Ê | Latin capital letter e with circumflex |
Ë | Ë | Latin capital letter e with diaeresis |
Ì | Ì | Latin capital letter i with grave |
Í | Í | Latin capital letter i with acute |
Î | Î | Latin capital letter i with circumflex |
Ï | Ï | Latin capital letter i with diaeresis |
Ð | Ð | Latin capital letter eth |
Ñ | Ñ | Latin capital letter n with tilde |
Ò | Ò | Latin capital letter o with grave |
Ó | Ó | Latin capital letter o with acute |
Ô | Ô | Latin capital letter o with circumflex |
Õ | Õ | Latin capital letter o with tilde |
Ö | Ö | Latin capital letter o with diaeresis |
Ø | Ø | Latin capital letter o with stroke |
Ù | Ù | Latin capital letter u with grave |
Ú | Ú | Latin capital letter u with acute |
Û | Û | Latin capital letter u with circumflex |
Ü | Ü | Latin capital letter u with diaeresis |
Ý | Ý | Latin capital letter y with acute |
Þ | Þ | Latin capital letter thorn |
ß | ß | Latin small letter sharp s (German Eszett) |
à | à | Latin small letter a with grave |
á | á | Latin small letter a with acute |
â | â | Latin small letter a with circumflex |
ã | ã | Latin small letter a with tilde |
ä | ä | Latin small letter a with diaeresis |
å | å | Latin small letter a with ring above |
æ | æ | Latin lowercase ligature ae |
ç | ç | Latin small letter c with cedilla |
è | è | Latin small letter e with grave |
é | é | Latin small letter e with acute |
ê | ê | Latin small letter e with circumflex |
ë | ë | Latin small letter e with diaeresis |
ì | ì | Latin small letter i with grave |
í | í | Latin small letter i with acute |
î | î | Latin small letter i with circumflex |
ï | ï | Latin small letter i with diaeresis |
ð | ð | Latin small letter eth |
ñ | ñ | Latin small letter n with tilde |
ò | ò | Latin small letter o with grave |
ó | ó | Latin small letter o with acute |
ô | ô | Latin small letter o with circumflex |
õ | õ | Latin small letter o with tilde |
ö | ö | Latin small letter o with diaeresis |
ø | ø | Latin small letter o with stroke |
ù | ù | Latin small letter u with grave |
ú | ú | Latin small letter u with acute |
û | û | Latin small letter u with circumflex |
ü | ü | Latin small letter u with diaeresis |
ý | ý | Latin small letter y with acute |
þ | þ | Latin small letter thorn |
ÿ | ÿ | Latin small letter y with diaeresis |
ˆ | ˆ | modifier letter circumflex accent |
˜ | ˜ | small tilde |
See also: | HtmlToAnsi(), HtmlToOem(), OemToHtml(), THtmlDocument() |
Category: | Conversion functions , HTML functions , xHarbour extensions |
Source: | tip\thtml.prg |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows a result of AnsiToHtml() PROCEDURE Main LOCAL cText := 'Copyright © 2007 xHarbour Inc' ? AnsiToHtml( cText ) // result: Copyright © 2007 xHarbour Inc RETURN
http://www.xHarbour.com