NWLUTF8ToUnicodeSize

Computes the number of bytes that must be allocated to convert 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) NWLUTF8ToUnicodeSize (
      pnuint8   utf8Str,
      pnuint    size);
   

Pascal Syntax

   uses netwin32 
    
   Function NWLUTF8ToUnicodeSize 
     (utf8Str : pnuint8;
     size : pnuint
   ): nint;
   

Parameters

utf8Str
(IN) Points to a UTF-8 string.
size
(OUT) Points to the number of bytes necessary to represent the Unicode string, including the string termination character.

Return Values

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

0

N_SUCCESS

-506

UNI_ILLEGAL_UTF8_CHARACTER

Remarks

For sample code, see utf8.c.

See Also

NWLUnicodeToUTF8, NWLUnicodeToUTF8Size, NWLUTF8ToUnicode