NWLUTF8ToUnicode

Converts a UTF-8 string to Unicode.

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

   N_GLOBAL_LIBRARY(nint) NWLUTF8ToUnicode (
      pnuint8    utf8Str,
      nuint      maxSize,
      punicode   uniStr,
      pnuint     uniSize,
      ppnstr     badSequence);
   

Pascal Syntax

   uses netwin32 
    
   Function NWLUTF8ToUnicode 
     (utf8Str : pnuint8;
     maxSize : nuint;
     uniStr : punicode;
     uniSize : pnuint;
     badSequence : ppnstr              
   ): nint;
   

Parameters

utf8Str
(IN) Points to the UTF-8 string to be converted.
maxSize
(IN) Specifies the size (in bytes) allocated for uniStr.
uniStr
(OUT) Points to a buffer to hold the converted Unicode string.
uniSize
(OUT) Points to the length (in bytes) of the converted string contained in uniStr, including the string termination character (optional).
badSequence
(OUT) Points to a bad UTF-8 sequence if an error occurs (optional).

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0

N_SUCCESS

-500

UNI_INSUFFICIENT_BUFFER

-506

UNI_ILLEGAL_UTF8_CHARACTER

Remarks

For sample code, see utf8.c.

See Also

NWLUnicodeToUTF8, NWLUnicodeToUTF8Size, NWLUTF8ToUnicodeSize