Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/px/pxtranslateunknown.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/px/pxtranslateunknown.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/px/pxtranslateunknown.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/px/pxtranslateunknown.html on line 8

PxTranslateUnknown()

Control how unknown encodings are handled

Synopsis:

#include <photon/PxProto.h>

int PxTranslateUnknown( struct PxTransCtrl *ctrl,
                        uint16_t to,
                        uint16_t from );

Library:

phexlib

Description:

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.

The from argument is similar, but is used when converting from UTF-8 by calling PxTranslateFromUTF() or PxTranslateStateFromUTF().

Returns:

0
Success.
-1
An error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

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

Unicode Multilingual Support in the Photon Programmer's Guide


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/photon/lib_ref/px/pxtranslateunknown.html on line 131

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/photon/lib_ref/px/pxtranslateunknown.html on line 131