Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode 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
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
MS Storage Providers
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
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

 

 

 

Language Detection : Determine which Languages are Present in a String

Demonstrates how to encode/decode strings in various encodings w/ any charset.

<% @CodePage = 65001 %>
<% Response.CodePage = 65001 %> 

<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<%
' This ASP example demonstrates how to use CkString
' to do language detection.

' Don't forget to save this .asp file in the utf-8 encoding!!!

sub detectLanguages(s)

	Response.Write s & "<br>"
	
	set cks = Server.CreateObject("Chilkat_9_5_0.CkString")
	cks.Append s
	
	' How many us-ascii characters are in s?
	n = cks.NumAscii
	Response.Write CStr(n) & " US-ASCII chars<br>"
	
	' How many Latin (8bit) characters are in s?
	' These are typically the characters with diacritics (i.e. accent marks)
	n = cks.NumLatin
	Response.Write CStr(n) & " Latin chars<br>"
	
	' How many Central European characters are in s?
	' These are also typically the characters with diacritics (i.e. accent marks)
	n = cks.NumCentralEuro
	Response.Write CStr(n) & " Central European chars<br>"
	
	' How many Greek characters are in s?
	n = cks.NumGreek
	Response.Write CStr(n) & " Greek chars<br>"
	
	' How many Hebrew characters are in s?
	n = cks.NumHebrew
	Response.Write CStr(n) & " Hebrew chars<br>"
	
	' How many Arabic characters are in s?
	n = cks.NumArabic
	Response.Write CStr(n) & " Arabic chars<br>"
	
	' How many Japanese characters are in s?
	n = cks.NumJapanese
	Response.Write CStr(n) & " Japanese chars<br>"
	
	' How many Korean characters are in s?
	n = cks.NumKorean
	Response.Write CStr(n) & " Korean chars<br>"
	
	' How many Chinese characters are in s?
	n = cks.NumChinese
	Response.Write CStr(n) & " Chinese chars<br>"
	
	' How many Thai characters are in s?
	n = cks.NumThai
	Response.Write CStr(n) & " Thai chars<br>"
	
	' How many Cyrillic characters are in s?
	n = cks.NumCyrillic
	Response.Write CStr(n) & " Cyrillic chars<br>"
	
	Response.Write "<p>"
	
end sub

detectLanguages "ABC 私はガラスを食べられます。それは私を傷つけません。"
detectLanguages "ABC Sôn bôn de magnà el véder, el me fa minga mal."
detectLanguages "ABC Mogę jeść szkło i mi nie szkodzi."
detectLanguages "ABC Я могу есть стекло, оно мне не вредит."
detectLanguages "ABC אני יכול לאכול זכוכית וזה לא מזיק לי."
detectLanguages "ABC أنا قادر على أكل الزجاج و هذا لا يؤلمني."
detectLanguages "ABC ฉันกินกระจกได้ แต่มันไม่ทำให้ฉันเจ็บ"
detectLanguages "ABC 我能吞下玻璃而不伤身体"
detectLanguages "ABC 私はガラスを食 Sôn bôn Mogę jeść szkło"

%>
</body>
</html>
 

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