Function IsUnicode() Foundation

Determine whether a character string has Unicode format.

IsUnicode( <cString> ) --> lIsUnicode
<cString> is a character string in Unicode or ANSI format.

The function returns a logical value. If <cString> is a string in Unicode format, the value .T. (true) is returned. If <cString> is a single-byte string such as ANSI/OEM, IsUnicode() returns .F. (false).


The IsUnicode() function determines whether a character string is a Unicode or an ANSI string. Unicode strings are used with certain Win32 API functions.

The function uses statistical as well as deterministic methods to ascertain the format of the string, which is not always 100% perfect. This means that some strings that are actually Unicode character strings might not be recognized as such and vice versa.

The Windows platform uses UTF-16 Little Endian encoding for Unicode character strings.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.