Convert a string from the encoding of the current locale into a form suitable for storing in a window property.
the `GdkDisplay` where the encoding is defined
a nul-terminated string
location to store the encoding (to be used as the type for the property)
location to store the format of the property
location to store newly allocated data for the property
the length of
0 upon success, non-zero upon failure