VB.NET Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript

VB.NET Examples

Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
FTP
HTML to XML
HTTP
IMAP
Encryption
MHT / HTML Email
PFX
RSA Encryption
S/MIME
Socket
Spider
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Byte Array
VB.NET FTPS
System.IO

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

Internationalized Zip with OEM Code Page

Download Chilkat .NET for 2.0 / 3.5 Framework

Download Chilkat .NET for 1.0 / 1.1 Framework

This example show how to create a Zip containing filenames specific to any language. It selects an OEM code page prior to creating the Zip.

        Dim zip As New Chilkat.Zip()

        ' Anything begins the 30-day trial
        Dim unlocked As Boolean
        unlocked = zip.UnlockComponent("30-day trial")
        If (Not unlocked) Then
            MsgBox("Failed to unlock Zip library")
            Exit Sub
        End If

        zip.NewZip("test.zip")

        ' On NTFS filesystems, filenames are Unicode, so characters
        ' in any language are supported.

        ' Zip files, however, store filenames in the OEM code page
        ' of the computer where the Zip is created.  This means
        ' that a Zip containing Japanese filenames in the USA
        ' will not unzip properly in Japan -- because the OEM
        ' code page of the source/destination computers are likely
        ' to be different.  

        ' Here is a list of OEM code pages:
        ' 437 OEM - United States 
        ' 737 OEM - Greek (formerly 437G) 
        ' 775 OEM - Baltic
        ' 850 OEM - Multilingual Latin I 
        ' 852 OEM - Latin II 
        ' 855 OEM - Cyrillic (primarily Russian) 
        ' 857 OEM - Turkish
        ' 858 OEM - Multlingual Latin I + Euro symbol 
        ' 860 OEM - Portuguese
        ' 861 OEM - Icelandic
        ' 862 OEM - Hebrew
        ' 863 OEM - Canadian - French
        ' 864 OEM - Arabic
        ' 865 OEM - Nordic
        ' 866 OEM - Russian
        ' 869 OEM - Modern Greek 
        ' 874 ANSI/OEM - Thai (same as 28605, ISO 8859-15) 
        ' 932 ANSI/OEM - Japanese, Shift-JIS 
        ' 936 ANSI/OEM - Simplified Chinese (PRC, Singapore) 
        ' 949 ANSI/OEM - Korean (Unified Hangeul Code) 
        ' 950 ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)  

        ' Assuming this example is running on a computer in the USA
        ' with OEM code page 437, and the Zip is to be delivered to
        ' a computer in Japan with OEM code page 932, we would override
        ' the default OEM code page of the Zip.  (Chilkat automatically
        ' uses the default OEM code page of the computer when creating
        ' Zips.)
        zip.OemCodePage = 932

        ' Append files to the Zip.
        Dim success As Boolean
        zip.AppendFromDir = "c:/temp/something"
        ' Add the entire directory tree.
        success = zip.AppendFiles("*", True)
        If (Not success) Then
            MsgBox(zip.LastErrorText)
            Exit Sub
        End If

        ' Write the Zip archive.
        success = zip.WriteZipAndClose()
        If (Not success) Then
            MsgBox(zip.LastErrorText)
        Else
            MsgBox("Created Zip!")
        End If




Important: The download for this example does not contain the ChilkatDotNet.dll which
must be downloaded and installed separately at http://www.chilkatsoft.com/downloads.asp.
Once installed, add a reference to the DLL in the project by following the instructions at
http://www.example-code.com/vbdotnet/step2.asp

 

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

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

Mail Component · XML Parser