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

 

 

 

 

 

 

 

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

 

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