How to print the utf-16 characters in c
<pre><code>int main() 
{
    char c = 0x41;
    printf("char is : %c\n",c);

    c = 0xe9;
    printf("char is : %c\n",c);

    unsigned int d = 0x164e;
    printf("char is : %c\n",d);


    return 0;
}
</code></pre>

<p>What I want to print out are:</p>

<p><a href="https://i.stack.imgur.com/MAFBR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MAFBR.png" alt="enter image description here"></a></p>

<p>I use Ubuntu 64-bit VMware Workstation on windows and use Octal dump:</p>

<p><a href="https://i.stack.imgur.com/7V8r9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7V8r9.png" alt="enter image description here"></a></p>

<p>The hexadecimal value of the three chars from an utf-16 LE txt file.</p>

<p>The output:</p>

<p><a href="https://i.stack.imgur.com/RKBI6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RKBI6.png" alt="enter image description here"></a></p>

<p>How to print out utf-16 characters correctly?</p>