mme_charconvert_setup()

Indicate the default character encoding

Synopsis:

#include <mme/mme.h>
#include <mme/charconver.h>

int mme_charconvert_setup( mme_hdl_t *hdl,
                           const char *default_encoding,
                           uint32_t allow_detection );

Arguments:

hdl
An MME connection handle.
default_encoding
A pointer to string passed to the character conversion DLL loaded into the MME. The contents of this string are not currently defined. The character conversion DLL must understand the contents of thsi string.
allow_detection
A flag that determines if the MME and the character conversion DLL are permitted to perform encoding detection. Set to 1 to allow detection, or to 0 to disable detection.

Library:

mme

Description:

The function mme_charconvert_setup() changes the default fallback character encoding and passes the new values to the charconvert DLL so that it knows the new values requested by the system.

Character encoding conversion is required to convert different multimedia sources (ID3, WMA, etc.) into UTF-8 character format, so that strings are consistent throughout the system.

The MME already provides the ability to extend its character conversion algorithms by using the external DLL charconvert. However, the DLL can MME communicate the encoding used by a media source to this DLL only if the source itself indicates that encoding. In cases where the media source does not provide character encoding information, the character conversion DLL must attempt to detect the encoding and, if it is unable to do so, fall back to a default encoding.

mme_charconvert_setup() makes setting of the fallback encoding dynamic to allow easy configuration for different areas of the world. A device controller can tell the MME what new default encoding to use, and the MME can in turn pass this information on to the character conversion DLL, which would uses that default.

Events

None delivered.

Blocking and validation

This function performs no validations and doesn't block.

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

Creating an external DLL to provide character encoding routines in the chapter Configuring Internationalization of the MME Configuration Guide. mme_media_get_def_lang(), mme_media_set_def_lang()