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.624.723 Times

Unicode::Map8 0.12

  Date Added: March 06, 2010  |  Visits: 700

Unicode::Map8

Report Broken Link
Printer Friendly Version


Product Homepage
Download (83 downloads)



Unicode::Map8 is a mapping table between 8-bit chars and Unicode. SYNOPSIS require Unicode::Map8; my $no_map = Unicode::Map8->new("ISO646-NO") || die; my $l1_map = Unicode::Map8->new("latin1") || die; my $ustr = $no_map->to16("V}re norske tegn b|r {resn"); my $lstr = $l1_map->to8($ustr); print $lstr; print $no_map->tou("V}re norske tegn b|r {resn")->utf8 The Unicode::Map8 class implement efficient mapping tables between 8-bit character sets and 16 bit character sets like Unicode. The tables are efficient both in terms of space allocated and translation speed. The 16-bit strings is assumed to use network byte order. The following methods are available: $m = Unicode::Map8->new( [$charset] ) The object constructor creates new instances of the Unicode::Map8 class. I takes an optional argument that specify then name of a 8-bit character set to initialize mappings from. The argument can also be a the name of a mapping file. If the charset/file can not be located, then the constructor returns undef. If you omit the argument, then an empty mapping table is constructed. You must then add mapping pairs to it using the addpair() method described below. $m->addpair( $u8, $u16 ); Adds a new mapping pair to the mapping object. It takes two arguments. The first is the code value in the 8-bit character set and the second is the corresponding code value in the 16-bit character set. The same codes can be used multiple times (but using the same pair has no effect). The first definition for a code is the one that is used. Consider the following example: $m->addpair(0x20, 0x0020); $m->addpair(0x20, 0x00A0); $m->addpair(0xA0, 0x00A0); It means that the character 0x20 and 0xA0 in the 8-bit charset maps to themselves in the 16-bit set, but in the 16-bit character set 0x0A0 maps to 0x20. $m->default_to8( $u8 ) Set the code of the default character to use when mapping from 16-bit to 8-bit strings. If there is no mapping pair defined for a character then this default is substituted by to8() and recode8(). $m->default_to16( $u16 ) Set the code of the default character to use when mapping from 8-bit to 16-bit strings. If there is no mapping pair defined for a character then this default is used by to16(), tou() and recode8(). $m->nostrict; All undefined mappings are replaced with the identity mapping. Undefined character are normally just removed (or replaced with the default if defined) when converting between character sets. $m->to8( $ustr ); Converts a 16-bit character string to the corresponding string in the 8-bit character set. $m->to16( $str ); Converts a 8-bit character string to the corresponding string in the 16-bit character set. $m->tou( $str ); Same an to16() but return a Unicode::String object instead of a plain UCS2 string. $m->recode8($m2, $str); Map the string $str from one 8-bit character set ($m) to another one ($m2). Since we assume we know the mappings towards the common 16-bit encoding we can use this to convert between any of the 8-bit character sets. $m->to_char16( $u8 ) Maps a single 8-bit character code to an 16-bit code. If the 8-bit character is unmapped then the constant NOCHAR is returned. The default is not used and the callback method is not invoked. $m->to_char8( $u16 ) Maps a single 16-bit character code to an 8-bit code. If the 16-bit character is unmapped then the constant NOCHAR is returned. The default is not used and the callback method is not invoked. The following callback methods are available. You can override these methods by creating a subclass of Unicode::Map8. $m->unmapped_to8 When mapping to 8-bit character string and there is no mapping defined (and no default either), then this method is called as the last resort. It is called with a single integer argument which is the code of the unmapped 16-bit character. It is expected to return a string that will be incorporated in the 8-bit string. The default version of this method always returns an empty string. Example: package MyMapper; @ISA=qw(Unicode::Map8); sub unmapped_to8 { my($self, $code) = @_; require Unicode::CharName; "<" . Unicode::CharName::uname($code) . ">"; } $m->unmapped_to16 Likewise when mapping to 16-bit character string and no mapping is defined then this method is called. It should return a 16-bit string with the bytes in network byte order. The default version of this method always returns an empty string..

Requirements: No special requirements
Platforms: Linux
Keyword: Character Character Set Character Sets Character String Libraries M- Mapping Mapping Table No Mapping Programming String
Users rating: 0/10

License: Freeware Size: 102.4 KB
USER REVIEWS
More Reviews or Write Review


UNICODE::MAP8 RELATED
Libraries  -  perlrecharclass 5.9.5
perlrecharclass package contains Perl regular expression character classes. The top level documentation about Perl regular expressions is found in perlre. This manual page discusses the syntax and use of character classes in Perl Regular...
14.8 MB  
Libraries  -  LBC Libraries 0.0.7
LBC Libraries is a set of easy C libraries that provide classical data types and structures (string, hash, queue, stack, tree). LBC Libraries package is focused on simplicity and portability. It uses ANSI C (C98 standard not required), and...
57.34 KB  
Games  -  Guess The Movie : Hindi 1.0
Guess the Movies : Hindi is one kind of puzzle game. One simple hindi movie poster appears, name the movie from it and win coins! Hints : 1) Use show character(s) to know any character 2) Choose answer from 7,5 Or 2 Options...
26 MB  
Education  -  Quiz Love Chemistry 3.0
You can memorize chemical symbols in quiz form from hydrogen to strontium. The character of an element depends on the location in the periodic table. It seems important for learning chemistry to make sure to an element name, the symbol, and...
2.6 MB  
Games  -  HealthyFatEater 1.0.0.0
Shingo is a future protagonist in an upcoming manga/anime. However, he is overweight. With that size, he will not be able to hold his place as the main character. Help my future manga character fat mode Shingo catch all the healthy foods!!!...
8 MB  
Libraries  -  Set::Integer::Gapfillers 0.07
Set::Integer::Gapfillers is a Perl module that can fill in the gaps between integer ranges. SYNOPSIS use Set::Integer::Gapfillers; $gf = Set::Integer::Gapfillers->new( lower => -12, upper => 62, sets => [ [ 1, 17 ], # Note: Use comma, not...
17.41 KB  
Libraries  -  StrBio 1.0
StrBio is a set of Java classes and libraries useful for development of software for computational structural biology research. They are licenced under the LGPL. he strbio.org classes are the basis for several published research projects,...
12.7 MB  
Libraries  -  Classeine::Sdk 0.0.3.0-b0004
Classeine::Sdk project is a set of general purpose class libraries written in C++ for NetBSD..
51.2 KB  
Libraries  -  Math::String 1.27
Math::String module contains arbitrary sized integers having arbitrary charsets to calculate with key rooms. SYNOPSIS use Math::String; use Math::String::Charset; $a = new Math::String cafebabe; # default a-z $b = new Math::String...
61.44 KB  
Programming  -  Portable Object Compiler 0.2.2
Portable Object Compiler project consists of a set of Objective-C class libraries and a precompiler (translator) that generates plain C code..
839.68 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  -  wolfSSL 3.11.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
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