Scroll to navigation

MARC::Charset::Code(3pm) User Contributed Perl Documentation MARC::Charset::Code(3pm)

NAME

MARC::Charset::Code - represents a MARC-8/UTF-8 mapping

SYNOPSIS

DESCRIPTION

Each mapping from a MARC-8 value to a UTF-8 value is represented by a MARC::Charset::Code object in a MARC::Charset::Table.

METHODS

new()

The constructor.

name()

A descriptive name for the code point.

marc()

A string representing the MARC-8 bytes codes.

ucs()

A string representing the UCS code point in hex.

charset_code()

The MARC-8 character set code.

is_combining()

Returns true/false to tell if the character is a combining character.

marc_left_half()

If the character is the right half of a "double diacritic", returns a hex string representing the MARC-8 value of the left half.

marc_right_half()

If the character is the left half of a "double diacritic", returns a hex string representing the MARC-8 value of the right half.

to_string()

A stringified version of the object suitable for pretty printing.

char_value()

Returns the unicode character. Essentially just a helper around ucs().

g0_marc_value()

The string representing the MARC-8 encoding for lookup.

marc_value()

The string representing the MARC-8 encodingA for output.

charset_name()

Returns the name of the character set, instead of the code.

to_string()

Returns a stringified version of the object.

marc8_hash_code()

Returns a hash code for this Code object for looking up the object using MARC8. First portion is the character set code and the second is the MARC-8 value.

utf8_hash_code()

Returns a hash code for uniquely identifying a Code by it's UCS value.

default_charset_group

Returns 'G0' or 'G1' indicating where the character is typicalling used in the MARC-8 environment.

get_marc8_escape

Returns an escape sequence to move to the Code from another marc-8 character set.

charset_value

Returns the charset value, not the hex sequence.

2022-08-02 perl v5.34.0