Perl Examples

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

Perl Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML Conversion
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
SMTP
Socket / SSL
Spider
SFTP
SSH Key
SSH
SSH Tunnel
Tar
HTTP Upload
XML
XMP
Zip

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

 

 

 

 

 

 

 

HTML Entity Encode and Decode

 Chilkat Perl Module Downloads for Windows, Linux, and MAC OS X

Perl script to HTML entity encode and decode strings.

#The declaration "use utf8;" determines how the script source file containing it is 
#interpreted. If this declaration is used, strings within the source file will be 
#interpreted as being encoded in utf8.
use utf8;

use chilkat;

$s = new chilkat::CkString();
$s->appendUtf8("Is féidir liom gloinne a ithe. Ní dhéanann sí dochar ar bith dom.");
$s->entityEncode();

# Note: Printing to the DOS console requires the OEM code page,
# which is ibm850 on US and Western European computers...

# Prints: "Is féidir liom gloinne a ithe. Ní dhéanann sí dochar ar bith dom."

print($s->getEnc("ibm850") . "\n");

# Now decode the entities...
$s->entityDecode();

# Prints: "Is féidir liom gloinne a ithe. Ní dhéanann sí dochar ar bith dom."
print($s->getEnc("ibm850") . "\n");

# PS: Here are ways to get the string into a PERL string variable
# in the encoding of your choice...
$s1 = $s->getUtf8();
$s2 = $s->getAnsi();
$s3 = $s->getEnc("iso-8859-1");
$s4 = $s->getEnc("ebcdic");





 

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