Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Internationalized Zip with OEM Code Page
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 |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2007 Chilkat Software, Inc. All Rights Reserved.