OpenersNotesSection(Spacer1)Details

MLGetUTF32Symbol() allocates memory for the character string. You must call (NonWLLink[MLReleaseUTF32Symbol(), paclet:ref/c/MLReleaseUTF32Symbol]) to disown this memory. If MLGetUTF32Symbol() fails and the function's return value indicates an error, do not call (NonWLLink[MLReleaseUTF32Symbol(), paclet:ref/c/MLReleaseUTF32Symbol]) on the contents of s.

MLGetUTF32Symbol() returns immutable data.

MLGetUTF32Symbol() stores all characters directly in the UTF-32 encoding form.

The symbol s returned by MLGetUTF32Symbol() begins with a byte order mark.

The symbol length len includes the byte order mark.

MLGetUTF32Symbol() returns 0 in the event of an error, and a nonzero value if the function succeeds.

Use (NonWLLink[MLError(), paclet:ref/c/MLError]) to retrieve the error code if MLGetUTF32Symbol() fails.

MLGetUTF32Symbol() is declared in the MathLink header file (RefLink[mathlink.h, paclet:ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

/* read a UTF-32 encoded symbol from a link */

void f(MLINK lp)
{
	const unsigned int *symbol;
	int len;

	if(! MLGetUTF32Symbol(lp, &symbol, &len))
		{
			/* unable to read the UTF-32 symbol from lp */
			return;
		}

	/* ... */

	MLReleaseUTF32Symbol(lp, symbol, len);
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLGetSymbol(), paclet:ref/c/MLGetSymbol])  ▪  (NonWLLink[MLGetByteSymbol(), paclet:ref/c/MLGetByteSymbol])  ▪  (NonWLLink[MLGetUCS2Symbol(), paclet:ref/c/MLGetUCS2Symbol])  ▪  (NonWLLink[MLGetUTF8Symbol(), paclet:ref/c/MLGetUTF8Symbol])  ▪  (NonWLLink[MLGetUTF16Symbol(), paclet:ref/c/MLGetUTF16Symbol])
 ▫ 
(NonWLLink[MLReleaseUTF32Symbol(), paclet:/ref/c/MLReleaseUTF32Symbol])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Manipulating Expressions in External Programs, paclet:tutorial/ManipulatingExpressionsInExternalPrograms])}, {▪(RefLinkPlain[Handling Lists, Arrays, and Other Expressions, paclet:tutorial/HandlingListsArraysAndOtherExpressions])}})}})