Caution: This version of this document is no longer maintained. For the latest documentation, see


Create a list of all supported character translations


#include <photon/PxProto.h>

int PxTranslateList( PtWidget_t *widget,
                     char const *none );




This function may be used to create a list or combobox of all supported character translations. It takes as a parameter a pointer to a list-type widget and sets its Pt_ARG_ITEMS resource to be the list of translations. These translations are read from the file /usr/photon/translations/charsets, using the Description entry as the item text.

If non-NULL, the none parameter points to a string to be added to the top of the list. This allows you to specify an entry such as None or Default. Your application will need to know how to handle this entry when it's chosen.

This list may then be used at run time to alter the current translation dynamically. The program should call PxTranslateSet() with the selected description text to install the new encoding.


The number of items placed in the list, or -1 on error.



Interrupt handler No
Signal handler No
Thread No

See also:

PxTranslateFromUTF(), PxTranslateSet(), PxTranslateStateFromUTF(), PxTranslateStateToUTF(), PxTranslateToUTF(), PxTranslateUnknown()

Unicode Multilingual Support in the Photon Programmer's Guide