Visual Basic Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB Examples

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

More Examples...
Email Object
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA


VB Strings
VB Byte Array

Unreleased...
Bzip2
LZW
Icon

 

 

 

 

 

 

 

Load UTF-8 Text File into VB String

Download Chilkat Charset ActiveX

Visual Basic example program showing how to load a utf-8 file into a VB string.

    Dim cc As New ChilkatCharset2
    cc.UnlockComponent "anything for 30-day trial"
    
    Dim textData As Variant
    textData = cc.ReadFile("utf8_icelandic.txt")
    
    cc.FromCharset = "utf-8"
    
    ' VB Strings are Unicode (ucs-2, i.e. 2 bytes/char)
    ' Convert the utf-8 bytes to a Unicode string:
    Dim s As String
    s = cc.ConvertToUnicode(textData)
    
    ' Note: VB6 does not display all languages very well.  Although the string
    ' is Unicode and is capable of holding characters in any language, the ability
    ' to display characters is limited.  The Microsoft Forms 2.0 Object Library
    ' can be referenced to provide lables, text boxes, etc. that are Unicode compatible.
    MsgBox s

 

Need a specific example? Send a request to support@chilkatsoft.com

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