ASP Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

ASP Examples

ASP String
ASP Byte Array
Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar
ASP Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
LZW

 

 

 

 

 

 

Language Detection : Determine which Languages are Present in a String

The Chilkat ASP String Component is freeware and may be used in any ASP application. To install, download and unzip the ASP String Component. Then copy the CkString.dll to a directory on your ASP Web Server and register it with regsvr32.exe.

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 the Chilkat String component
' 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.String")
	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-2012 Chilkat Software, Inc. All Rights Reserved.