GdkX11.X11Display.string_to_compound_text

### Method

# GdkX11 X11Displaystring_to_compound_text

#### Declaration [src]

    int
    gdk_x11_display_string_to_compound_text (
      GdkDisplay* display,
      const char* str,
      const char** encoding,
      int* format,
      guchar** ctext,
      int* length
    )

#### Description [src]

Convert a string from the encoding of the current locale into a form suitable for storing in a window property.

#### Parameters

`str`

  Type: `const char*`

  A nul-terminated string.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`encoding`

  Type: `const char**`

  Location to store the encoding (to be used as the type for the property)

  The argument will be set by the function.
  The data is owned by the instance.
  The value is a NUL terminated UTF-8 string.

`format`

  Type: `int*`

  Location to store the format of the property.

  The argument will be set by the function.

`ctext`

  Type: An array of `guchar*`

  Location to store newly allocated data for the property.

  The argument will be set by the function.
  The length of the array is specified in the `length` argument.
  The caller of the method takes ownership of the data, and is responsible for freeing it.

`length`

  Type: `int*`

  The length of `ctext`, in bytes.

  The argument will be set by the function.

#### Return value

Type: `int`

0 upon success, non-zero upon failure.