---
name: "XmRegisterSegmentEncoding"
section: "3"
platform: "linux"
package: "openmotif"
version: "2.3.8-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XmRegisterSegmentEncoding"
---

# XmRegisterSegmentEncoding(3)

A compound string function that registers a compound text encoding format for a specified font list element tag

## NAME

**XmRegisterSegmentEncoding** — A compound string function that registers a compound text encoding format for a specified font list element tag

## SYNOPSIS

```
#include <Xm/Xm.h>
char * XmRegisterSegmentEncoding(
char *fontlist_tag,
char *ct_encoding);
```

## DESCRIPTION

**XmRegisterSegmentEncoding** registers a compound text encoding format with the specified font list element tag. The **XmCvtXmStringToCT** function uses this registry to map the font list tags of compound string segments to compound text encoding formats. Registering a font list tag that already exists in the registry overwrites the original entry. You can unregister a font list tag by passing a NULL value for the *ct\_encoding* parameter.

- *fontlist\_tag*

  Specifies the font list element tag to be registered. The tag must be a NULL-terminated ISO8859-1 string.

- *ct\_encoding*

  Specifies the compound text character set to be used for segments with the font list tag. The value must be a NULL-terminated ISO8859-1 string. A value of **XmFONTLIST\_DEFAULT\_TAG** maps the specified font list tag to the code set of the locale.

## RETURN

Returns NULL for a new font list tag or the old *ct\_encoding* value for an already registered font list tag. The application is responsible for freeing the storage associated with the returned data (if any) by calling **XtFree**.

## RELATED

[**XmCvtXmStringToCT**(3)](/XmCvtXmStringToCT/3.md), [**XmFontList**(3)](/XmFontList/3.md), [**XmMapSegmentEncoding**(3)](/XmMapSegmentEncoding/3.md), and [**XmString**(3)](/XmString/3.md).
