NWUXUnicodeToBytePath
Converts a Unicode file path string into a NULL-terminated byte string
#include <nunicode.h> N_EXTERN_LIBRARY(nint) NWUXUnicodeToBytePath ( pCONVERT byteUniHandle, pnuint8 byteOutput, nuint outputBufferLen, const unicode N_FAR *unicodeInput, pnuint actualLength);
uses netwin32 Function NWUXUnicodeToBytePath (byteUniHandle : pCONVERT; byteOutput : pnuint8; outputBufferLen : nuint unicodeInput : const unicode actualLength : pnuint ): nint;
When you want to convert a file path, call the NWUXUnicodeToBytePath function rather than the NWUXUnicodeToByte function.
Regardless of the language being converted, NWUXUnicodeToBytePath interprets Unicode yen (00A5), won (20A9), backslash (005C), and the Novell defined path separator (F8F7) all as path separators and converts each to the byte backslash character (5C).
By default, NWUXUnicodeToBytePath converts an unmappable Unicode character into a special 6-byte sequence. For example, 0x2620 is converted to "[2620]".
By default, NWUXUnicodeToBytePath does not recognize any special Unicode sequences for conversion. For example, the Unicode string "ab[81]cd" will be returned as the byte string "ab[81]cd".
Call NWUXUnicodeToBytePath to determine the size of the string before it is converted by setting the byteOutput parameter to NULL. The outputBufferLen parameter will be ignored, a converted string will not be returned, and the length of the string if it were converted will be returned in the actualLength parameter.
See exunibp.c for sample code.