locn2unispecial

Converts a string from a local code page to Unicode.

Library:LibC
Service:Characters and Strings

Syntax

  #include <unilib.h> 
   
  int locn2unispecial (
     UniRuleTable_t   handle,
     unicode_t       *dest,
     size_t          *destLen,
     const char      *src,
     size_t           srcLen );
  

Parameters

handle

(IN) Specifies the table to use in the conversion. To use the host's default code page, specify UNI_LOCAL_DEFAULT. Otherwise, specify the value returned from the UniGetTable function.

dest

(OUT) Points to the converted string.

destLen

(IN/OUT) Points to the maximum number of Unicode characters that the destination string can hold when the function is called. When the function returns, it contains the number of Unicode characters in the converted string.

src

(IN) Points to the source string.

srcLen

(IN) Specifies the number of bytes in the source string.

Return Values

If successful, returns 0. Otherwise, returns a negative error code:

Decimal

Name

Description

-496

UNI_ERR_BAD_HANDLE

The table parameter specifies a nonexistent rule table.

-532

UNI_ERR_UNMAPPABLE_CHAR

A character in the source is unmappable.

See Also