---
name: "MARC::Charset::Code"
section: "3pm"
platform: "linux"
package: "libmarc-charset-perl"
version: "1.35-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/MARC::Charset::Code"
---

# MARC::Charset::Code(3pm)

represents a MARC-8/UTF-8 mapping

## 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.
