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 MLPutUTF16Symbol(MLINK link, const unsigned short *s, int len)
puts a symbol whose name is given by UTF-16 encoded string s with length len to the MathLink connection specified by link.
  • The symbol must be encoded in the UTF-16 character encoding form.
  • MLPutUTF16Symbol() returns 0 in the event of an error, and a nonzero value if the function succeeds.
  • Use MLError() to retrieve the error code if MLPutUTF16Symbol() fails.
  • MLPutUTF16Symbol() is declared in the MathLink header file mathlink.h.
#include "mathlink.h"

/* send the symbol $TopDirectory to a link */

void f(MLINK lp)
    unsigned short symb[13];

    symb[0] = '$';
    symb[1] = 'T';
    symb[2] = 'o';
    symb[3] = 'p';
    symb[4] = 'D';
    symb[5] = 'i';
    symb[6] = 'r';
    symb[7] = 'e';
    symb[8] = 'c';
    symb[9] = 't';
    symb[10] = 'o';
    symb[11] = 'r';
    symb[12] = 'y';

    if(! MLPutUTF16Symbol(lp, (const unsigned short *)symb, 13))
        { /* unable to put the symbol to lp */ }