asc2uni

Converts a string from the ASCII to Unicode.

Library:LibC
Service:Characters and Strings

Syntax

  #include <unilib.h> 
   
  unicode_t *asc2uni (
     unicode_t    *dest,
     const char   *src);
  

Parameters

dest

(OUT) Points to the converted Unicode string.

src

(IN) Points to the ASCII source string.

Return Values

Returns the address of the converted string.

Remarks

The asc2uni function is an abbreviated, non-preferred interface to perform translation from local to Unicode. It assumes that the source string contains only characters in the range 0x00 - 0x7F (7-bit ASCII). Characters that use all eight bits are not translated correctly. This function is useful for quickly translating ASCII strings in source code into Unicode.

Also, asc2uni assumes, much like strcpy, that the destination string is big enough to hold the source string.

For sample code, see UniLib.c.

See Also