NWUXUnicodeToUntermBytePath

Converts a Unicode file path string into an unterminated byte string

Local Servers:nonblocking
Remote Servers:N/A
NetWare Server:4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows95, Windows 98
Library:Cross-Platform Localization (LOC*.*)
Service:Unicode

Syntax

   #include <nunicode.h> 
    
   N_EXTERN_LIBRARY(nint) NWUXUnicodeToUntermBytePath  ( 
      pCONVERT               byteUniHandle,  
      pnuint8                byteOutput,  
      nuint                  outputBufferLen,  
      const unicode N_FAR   *unicodeInput,  
      pnuint                 actualLength);
   

Pascal Syntax

   uses netwin32 
    
   Function NWUXUnicodeToUntermBytePath 
     (byteUniHandle : pCONVERT;
     byteOutput : pnuint8;
     outputBufferLen : nuint
     unicodeInput : const unicode
     actualLength : pnuint
   ): nint;
   

Parameters

byteUniHandle
(IN) Points to the Unicode converter handle.
byteOutput
(OUT) Points to the output buffer to receive the unterminated byte string (optional).
outputBufferLen
(IN) Specifies the maximum size of the output buffer in bytes.
unicodeInput
(IN) Points to the input buffer containing the Unicode string to be converted.
actualLength
(OUT) Points to the returned length (in bytes) of the converted string (optional). Does not include the NULL terminator.

Return Values

0x0000

SUCCESSFUL

0xFDE9

NWU_NULL_HANDLE

0xFDEA

NWU_BAD_HANDLE

0xFDEB

NWU_HANDLE_MISMATCH

0xFDEC

NWU_UNMAPPABLE_CHAR

0xFDEE

NWU_BUFFER_FULL

Remarks

When you want to convert a file path, call the NWUXUnicodeToUntermBytePath function rather than the NWUXUnicodeToUntermByte function.

Regardless of the language being converted, NWUXUnicodeToUntermBytePath 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, NWUXUnicodeToUntermBytePath converts an unmappable Unicode character into a special unterminated 6-byte sequence. For example, 0x2620 is converted to "[2620]".

By default, NWUXUnicodeToUntermBytePath 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 NWUXUnicodeToUntermBytePath 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 exuniubp.c for sample code.

See Also

NWUXLenByteToUnicodePath, NWUXUnicodeToUntermByte