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

# XmCvtXmStringTableToTextProperty(3)

A function that converts from XmStringTable to an XTextProperty Structure

## NAME

**XmCvtXmStringTableToTextProperty** — A function that converts from XmStringTable to an XTextProperty Structure

## SYNOPSIS

```
#include <Xm/Xm.h>
int XmCvtXmStringTableToTextProperty (display, string_table, count, style, text_prop_return)
        Display *display;
        XmStringTable   string_table;
        int     count;
        XmICCEncodingStyle      style;
        XTextProperty   *text_prop_return;
(void)
```

## DESCRIPTION

**XmCvtXmStringTableToTextProperty** converts the **XmString**s in the specified **XmStringTable** into an **XTextProperty** structure.

The function sets the encoding member of *text\_prop\_return* to an **Atom** for the specified display naming the encoding determined by the specified style, and it converts the first *count* compound strings in the specified **XmStringTable** to this encoding for storage in the *text\_prop\_return* value member. Following are the possible encoding styles:

- **XmSTYLE\_COMPOUND\_STRING**

  The encoding is **\_MOTIF\_COMPOUND\_STRING**. The function converts each specified **XmString** to a compound string in Byte Stream format.

- **XmSTYLE\_COMPOUND\_TEXT**

  The encoding is **COMPOUND\_TEXT**. The function converts each specified **XmString** to compound text.

- **XmSTYLE\_LOCALE**

  The encoding is the encoding of the current locale. The function converts each specified **XmString** to the encoding of the current locale.

- **XmSTYLE\_STRING**

  The encoding is **STRING** (plain C strings encoded in ISO8859-1), and the function converts each specified **XmString** to **STRING**.

- **XmSTYLE\_TEXT**

  If all specified **XmString**s are fully convertible to the encoding of the current locale, the encoding is the encoding of the current locale, and the function converts each specified **XmString** to the encoding of the current locale. Otherwise, the encoding is **COMPOUND\_TEXT**, and the function converts each specified compound string to compound text.

- **XmSTYLE\_STANDARD\_ICC\_TEXT**

  If all specified **XmString**s are fully convertible to **STRING**, the encoding is **STRING**, and the function converts each specified **XmString** to **STRING**. Otherwise, the encoding is **COMPOUND\_TEXT**, and the function converts each specified **XmString** to compound text.

- *display*

  Specifies the connection to the X server.

- *string\_table*

  Specifies a set of **XmString**s.

- *count*

  Specifies the number of **XmString**s to be converted in *string\_table*.

- *style*

  Specifies the manner in which the property is encoded.

- *text\_prop\_return*

  Returns the **XTextProperty** structure.

To free the storage for the value member of the **XTextProperty**, use **XtFree**.

## RETURN VALUES

If conversion depends on the locale and the current locale is not supported, the function returns **XLocaleNotSupported**. In both of these cases, the function does not set *text\_prop\_return*.

To determine whether the function is guaranteed not to return **XLocaleNotSupported**, use **XSupportsLocale**.

## RELATED INFORMATION

[**XmCvtXmStringToByteStream**(3)](/XmCvtXmStringToByteStream/3.md), [**XmCvtTextPropertyToXmStringTable**(3)](/XmCvtTextPropertyToXmStringTable/3.md), and [**XmStringTable**(3)](/XmStringTable/3.md).
