Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.540.845 Times

Encode::PerlIO 5.8.1

  Date Added: January 21, 2010  |  Visits: 638

Encode::PerlIO

Report Broken Link
Printer Friendly Version


Product Homepage
Download (71 downloads)



Encode::PerlIO is a detailed document on Encode and PerlIO. Overview It is very common to want to do encoding transformations when reading or writing files, network connections, pipes etc. If Perl is configured to use the new perlio IO system then Encode provides a "layer" (see PerlIO) which can transform data as it is read or written. Here is how the blind poet would modernise the encoding: use Encode; open(my $iliad,<:encoding(iso-8859-7),iliad.greek); open(my $utf8,>:utf8,iliad.utf8); my @epic = < $iliad >; print $utf8 @epic; close($utf8); close($illiad); In addition, the new IO system can also be configured to read/write UTF-8 encoded characters (as noted above, this is efficient): open(my $fh,>:utf8,anything); print $fh "Any x{0021} string N{SMILEY FACE}n"; Either of the above forms of "layer" specifications can be made the default for a lexical scope with the use open ... pragma. See open. Once a handle is open, its layers can be altered using binmode. Without any such configuration, or if Perl itself is built using the systems own IO, then write operations assume that the file handle accepts only bytes and will die if a character larger than 255 is written to the handle. When reading, each octet from the handle becomes a byte-in-a-character. Note that this default is the same behaviour as bytes-only languages (including Perl before v5.6) would have, and is sufficient to handle native 8-bit encodings e.g. iso-8859-1, EBCDIC etc. and any legacy mechanisms for handling other encodings and binary data. In other cases, it is the programs responsibility to transform characters into bytes using the API above before doing writes, and to transform the bytes read from a handle into characters before doing "character operations" (e.g. lc, /W+/, ...). You can also use PerlIO to convert larger amounts of data you dont want to bring into memory. For example, to convert between ISO-8859-1 (Latin 1) and UTF-8 (or UTF-EBCDIC in EBCDIC machines): open(F, "<:encoding(iso-8859-1)", "data.txt") or die $!; open(G, ">:utf8", "data.utf") or die $!; while (< F >) { print G } # Could also do "print G < F >" but that would pull # the whole file into memory just to write it out again. More examples: open(my $f, "<:encoding(cp1252)") open(my $g, ">:encoding(iso-8859-2)") open(my $h, ">:encoding(latin9)") # iso-8859-15.

Requirements: No special requirements
Platforms: Linux
Keyword: Document Ebcdic Encode Encodeperlio Handle Libraries Open Perlio Print Programming Utf
Users rating: 0/10

License: Freeware Size: 11.3 MB
USER REVIEWS
More Reviews or Write Review


ENCODE::PERLIO RELATED
Libraries  -  Tie::Layers 0.06
SYNOPSIS ##### # Subroutines # use Tie::Layers qw(is_handle config); $yes = is_handle( $file_handle ); ($key, $old_value) = config(%options, $key); ($key, $old_value) = config(%options, $key => $new_value ); #### # Config default...
71.68 KB  
Database Tools  -  Get Hyperlink to Help Browser Page 1.0
Provide HREF text for Hyperlink to a Help Page Document Grabs the document link from the page currently open in the MATLAB Help Browser (doc). HTML text can be provided in MATLAB help pages for functions. This is useful when a specific help page...
10 KB  
File Utilities  -  McDwiff 1.1
McDwiff... DWF. Mac-style. Open, view, print, and convert Autodesk DWF files with this easy-to-use Mac application.Free for non-commercial use, $39 for commercial license.
87 KB  
Science  -  EpochX 1.4.1
EpochX is an open source genetic programming framework, specifically for analysing the properties of evolutionary automatic programming. It supports 3 popular representations - Strongly-Typed GP, Context-Free Grammar GP and Grammatical Evolution.
19.81 MB  
Utilities  -  Lx-Viewer 1.0.2
LX-Viewer is a program that will allow you to open, view, print and convert DWG or DXF files, typically used in AutoCAD related technical drafting. The most important feature is that LX-Viewer allows you to manipulate your DWG data on the Linux...
706.56 KB  
Programming  -  hexdump 1.6
hexdump produces a CP/M-like format by default, and can handle EBCDIC. It is internationalized, and has many formatting functions. This hex dumper was born because a) od octal format is appallingly ugly b) od -x aint much better c) I needed...
16.38 KB  
Finance  -  Document Convert 1.7 Build 5.27
Document Convert is an application that will help you convert documents from different directories into another file format. Supported the most popular document formats including MS Word files, Open Office, RTF, MS Write, Word Perfect, e-book...
 
Video Editors  -  Open Inventor 2.1.5
Open InventorTM is an object-oriented 3D toolkit offering a comprehensive solution to interactive graphics programming problems. It presents a programming model based on a 3D scene database that dramatically simplifies graphics programming. It...
7.9 MB  
Libraries  -  DynaPage::Document::ext::include 0.10
DynaPage::Document::ext::include module contains extensions of DynaPag::Document. METHODS template ( $self, $job ) : bool syntax: !include.template =- B See also DynaPage::Template NOTE: $self is parent document object (eg...
4.1 KB  
Libraries  -  Number::Encode 1.00
Number::Encode is a Perl module to encode bit strings into digit strings. SYNOPSIS use Number::Encode qw(nonuniform uniform); Provides a mechanism to convert arbitrary bit-strings into numeric digit strings. The transformation can be uniform...
2.05 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB