NWLocalToUnicode
Converts a local (code page based) character string to a Unicode character string
#include <unicode.h> N_EXTERN_LIBRARY(nint) NWLocalToUnicode ( nptr ruleHandle, punicode dest, nuint32 maxLen, const void N_FAR *src, unicode noMap, pnuint len, nuint32 allowNoMapFlag);
uses netwin32 Function NWLocalToUnicode (ruleHandle : nptr; dest : punicode; maxLen : nuint32; src : nptr; noMap : unicode; len : pnuint; allowNoMapFlag : nuint32 (*optional, available on NLM only*) );
These are common return values; see Return Values (Return Values for C) for more information.
For cross-platform operations, NWLocalToUnicode uses only the first six parameters. The seventh parameter is optionally available only for NLM applications.
On Win32 clients, this routine calls MultiByteToWideChar which results in some differences from other platforms. If there is insufficient space in the output buffer, Win32 clients set len to zero, and do not null terminate the buffer. Non-Win32 clients always return the number of unicode characters written into the output buffer and always null terminate.
If an input character is unmappable, Win32 clients use a default substitute character, not the noMap character. On non-Win32 clients, an unmappable character is replaced by the noMap character. If the noMap character is zero, it uses the default character contained in the rule table. If the rule table has no default, UNI_NO_DEFAULT is returned.
The allowNoMapFlag parameter provides another optional behavior, but only for the NLM platform (N_PLAT_NLM must be defined). By default, on NLM applications NWLocalToUnicode handles unmappable characters in the same way as non-Win32 clients described above. To specify behavior explicitly, define EXCLUDE_UNICODE_NLM_COMPATIBILITY_MACROS and pass one of the following values for allowNoMapFlag:
For examples, see