This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
MathLink C Function


int MLGetUTF32Symbol(MLINK link, const unsigned int **s, int *len)
gets a UTF-32 character string corresponding to the name of a symbol from the MathLink connection specified by link, storing the resulting string in s and the length in len.
  • MLGetUTF32Symbol() allocates memory for the character string. You must call MLReleaseUTF32Symbol() to disown this memory. If MLGetUTF32Symbol() fails and the function's return value indicates an error, do not call MLReleaseUTF32Symbol() on the contents of s.
  • MLGetUTF32Symbol() returns immutable data.
  • MLGetUTF32Symbol() stores all characters directly in the UTF-32 encoding form.
  • MLGetUTF32Symbol() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLGetUTF32Symbol() fails.
  • MLGetUTF32Symbol() is declared in the MathLink header file mathlink.h.
#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 */

    /* ... */

    MLReleaseUTF32Symbol(lp, symbol, len);