Query: marc::charset::table
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MARC::Charset::Table(3pm) User Contributed Perl Documentation MARC::Charset::Table(3pm)NAMEMARC::Charset::Table - character mapping dbSYNOPSISuse MARC::Charset::Table; use MARC::Charset::Constants qw(:all); # create the table object my $table = MARC::Charset::Table->new(); # get a code using the marc8 character set code and the character my $code = $table->lookup_by_marc8(CYRILLIC_BASIC, 'K'); # get a code using the utf8 value $code = $table->lookup_by_utf8(chr(0x043A));DESCRIPTIONMARC::Charset::Table is a wrapper around the character mapping database, which is implemented as a tied hash on disk. This database gets generated by Makefile.PL on installation of MARC::Charset using MARC::Charset::Compiler. The database is essentially a key/value mapping where a key is a MARC-8 character set code + a MARC-8 character, or an integer representing the UCS code point. These keys map to a serialized MARC::Charset::Code object. new() The consturctor. add_code() Add a MARC::Charset::Code to the table. get_code() Retrieve a code using a hash key. lookup_by_marc8() Looks up MARC::Charset::Code entry using a character set code and a MARC-8 value. use MARC::Charset::Constants qw(HEBREW); $code = $table->lookup_by_marc8(HEBREW, chr(0x60)); lookup_by_utf8() Looks up a MARC::Charset::Code object using a utf8 value. db() Returns a reference to a tied character database. MARC::Charset::Table wraps access to the db, but you can get at it if you want. db_path() Returns the path to the character encoding database. Can be called statically too: print MARC::Charset::Table->db_path(); brand_new() An alternate constructor which removes the existing database and starts afresh. Be careful with this one, it's really only used on MARC::Charset installation. perl v5.12.4 2010-09-09 MARC::Charset::Table(3pm)
Related Man Pages |
---|
language::intercal::charset::baudot(3pm) - debian |
marc::batch(3pm) - debian |
marc::charset::table(3pm) - debian |
marc::file::usmarc(3pm) - debian |
marc::file::xml(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Creating a Hash Table |
Deciphering the Code |
Extracting few lines from a file based on identifiers dynamically |
Error in while loop |
How do I partition an Oracle 11g Table? |