Click on a class name to see the description of that particular class:
string Encode(boolean alsoCR, boolean tagsVisible, boolean entities, obj tagList)
ISO 8859-1 Format Encoding
The Encode method encodes a string according to the ISO 8859-1 format (Latin-1). More precisely, Biferno uses the ANSI character set (Windows-1252), which is an extension of the ISO 8859-1 set. E.g., the à character is encoded as à (ampersand + hash + decimal numeric code of the character + semicolon).
This encoding is necessary to be able to output special characters on a Web page, such as vowels with accents, and symbols that might otherwise not be visualized correctly by the browser (this is a potential issue on the MacOS platform).
Specifies if we want to encode new line characters with <br> tags (default: no).
Indicates if we want to encode the < and > that delimit tags with < and > (or relative entities, default: no). This is useful, for example, if one wants to visualize a fragment of HTML code within a Web page avoiding interpretation by the browser. The < and > characters are always encoded when they are not part of a tag. The parameter tagList specifies "what is a tag"
Specifies if we want that encoding is performed using the so-called HTML entities instead of numerical codes (e.g. the à character is encoded as à, instead of à).
If this parameter is true all strings immediately preceeded by a "<" are considered tags. If the parameter is false are considered tag the usual HTML tags (<b>, <br>, <input> etc...).
If this parameter is an associative array, only tags matching with names of array elements are considered tag. For example, the following code:
str = "this is an <b><code>example</code></b>"
tagList = array("para":, "code":, "inlinecode":)
has the result:
this is an <b><code>example;</code></b>
we didn't ask the tag to be visible (tagsVisible is false) but the b is encoded because it is not recognized as a tag (is not in the array). Note also that the values of the array are not relevant, relevant are their names.
The string encoded
Decode, htmlTags, allTags
Return to the string class