Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Load UTF-8 Text File into VB String
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.