Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Decode HTML Entities

Download Chilkat Charset ActiveX

Visual Basic example program showing how to decode HTML entities.

    Dim cc As New ChilkatCharset2
    cc.UnlockComponent "anything for 30-day trial"

    ' This file can be downloaded from:
    ' http://www.chilkatsoft.com/text-samples/html_entities.txt
    ' The html_entities.txt file contains lines such as:
    ' pound sign  £     £  £        
    ' cent sign   ¢  ¢  ¢        
    ' pound sign  £     £  £        
    ' currency sign   ¤    ¤  ¤        
    ' yen sign = yuan sign    ¥   ¥  ¥        
    ' Latin small letter ae = Latin small 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  ð   ð  ð        
    
    ' First, load the text file into a VB string:
    Dim textData As Variant
    textData = cc.ReadFile("html_entities.txt")
    cc.FromCharset = "iso-8859-1"
    Text3.Text = cc.ConvertToUnicode(textData)
    
    ' Because HTML entities may represent characters in any language,
    ' the result of the entity decoding is always utf-8.
    ' Therefore, we first decode and then convert to a VB string (from utf-8)
    Dim decoded As Variant
    decoded = cc.HtmlEntityDecode(Text3.Text)
    cc.FromCharset = "utf-8"
    Text4.Text = cc.ConvertToUnicode(decoded)

    ' Alternatively, we can decode the entities directly from file-to-file:
    cc.ToCharset = "iso-8859-1"
    cc.HtmlEntityDecodeFile "html_entities.txt", "html_entities_decoded.txt"

 

© 2000-2012 Chilkat Software, Inc. All Rights Reserved.