Converts a string from a local code page to Unicode, tracking how much of the source string was consumed.
#include <unilib.h> int locnp2uni ( UniRuleTable_t table, unicode_t **target, size_t *destLen, char **source, size_t srcLen, unicode_t noMapCh, int noMapFlag );
(IN) Specifies the table to use in the conversion. To use the host's default code page, specify UNI_LOCAL_DEFAULT. Otherwise, specify the value returned from the UniGetTable function.
(OUT) Points to the null terminator after the last converted character in the string.
(IN/OUT) Points to the maximum number of Unicode characters that the destination string can hold when the function is called. When the function returns, it contains the number of Unicode characters in the converted string.
(IN) Points to the next character in the source string to be converted or to the null terminator if at the end of the string.
(IN) Specifies the number of bytes in the source string.
(IN) Specifies an arbitrary character to be used in place of a source character for which no mapping can be found in the table. The noMapFlag parameter determines whether this character is used.
(IN) Specifies whether to replace an unmappable character or simply return an error. It uses one of the following flags:
If successful, returns 0. Otherwise, returns a negative error code:
The locnp2uni function null terminates the target string, adding the termination if the source string does not contain it.