Chilkat Examples

ChilkatHOMEAndroid™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi DLLGoJavaNode.jsObjective-CPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwiftTclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

Classic ASP Examples

Web API Categories

ASN.1
AWS KMS
AWS Misc
Amazon EC2
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Azure Cloud Storage
Azure Key Vault
Azure Service Bus
Azure Table Service
Base64
Bounced Email
Box
CAdES
CSR
CSV
Cert Store
Certificates
Cloud Signature CSC
Code Signing
Compression
DKIM / DomainKey
DNS
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
EBICS
ECC
Ed25519
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
GMail SMTP/IMAP/POP
Geolocation
Google APIs
Google Calendar
Google Cloud SQL
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text
HTTP

HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
Misc
NTLM
OAuth1
OAuth2
OIDC
Office365
OneDrive
OpenSSL
Outlook
Outlook Calendar
Outlook Contact
PDF Signatures
PEM
PFX/P12
PKCS11
POP3
PRNG
REST
REST Misc
RSA
SCP
SCard
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
ScMinidriver
Secrets
SharePoint
SharePoint Online
Signing in the Cloud
Socket/SSL/TLS
Spider
Stream
Tar Archive
ULID/UUID
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl
uncategorized

 

 

 

Zip with Unicode Filenames

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

The NTFS filesystem supports Unicode and filenames can contain characters in any language. However, the Zip file standard is only capable of supporting a single language at a time (i.e. a single OEM code page). If your computer's default OEM code page is different than the language of the filename, then you would need to set the Zip.OemCodePage property to the correct value prior to appending files.

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)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<%

'  This example creates a .zip with filenames containing
'  Chinese characters.  Using Chilkat Zip, the .zip can
'  be created and unzipped on any locale computer.  However,
'  to unzip using a program such as WinZip, it must run
'  on a computer with the correct locale.

set zip = Server.CreateObject("Chilkat_9_5_0.Zip")

'  Any string unlocks the component for the 1st 30-days.
success = zip.UnlockComponent("Anything for 30-day trial")
If (success <> 1) Then
    Response.Write Server.HtmlEncode(zip.LastErrorText) & "<br>"

End If

zip.NewZip "chinese.zip"

'  Set the OEM code page to Chinese Big5
zip.OemCodePage = 950

'  Add references to all files under a "chinese" subdirectory.
'  This directory will contain filenames having Chinese characters.
zip.AppendFiles "chinese",1

success = zip.WriteZipAndClose()
If (success <> 1) Then
    Response.Write Server.HtmlEncode(zip.LastErrorText) & "<br>"

End If

'  Create a new instance of a zip object.  Load the .zip
'  we previously created and unzip to another directory.
set zip2 = Server.CreateObject("Chilkat_9_5_0.Zip")

'  Don't forget to set the OEM code page...
zip2.OemCodePage = 950

success = zip2.OpenZip("chinese.zip")
If (success <> 1) Then
    Response.Write Server.HtmlEncode(zip2.LastErrorText) & "<br>"

End If

'  This will unzip correctly on any locale computer.
success = zip2.Unzip("outDir")
If (success <> 1) Then
    Response.Write Server.HtmlEncode(zip2.LastErrorText) & "<br>"
Else
    Response.Write Server.HtmlEncode("unzipped!") & "<br>"
End If


%>
</body>
</html>

 

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