QNX Developer Support
Control how unknown encodings are handled
#include <photon/PxProto.h> int PxTranslateUnknown( struct PxTransCtrl *ctrl, uint16_t to, uint16_t from );
This function controls the behavior of the encoding routines when they encounter an invalid byte sequence or a character that can't be represented in the current encoding scheme.
The ctrl argument is a pointer to the control structure for a character set translation returned from a previous call to PxTranslateSet().
The to argument is used when converting to UTF-8 by calling PxTranslateToUTF() or PxTranslateStateToUTF(). If to is 0 (the default) and an invalid encoding is encountered, the translation is halted and returns an error. If to is nonzero, it's the Unicode character to insert into the translation instead of the invalid one.
- An error occurred.
Unicode Multilingual Support in the Photon Programmer's Guide