Hi Experts

I want to display "hindi" string on command terminal of Linux, I used

setlocale(LC_ALL, "hi_IN.utf8");

By using it I am able to display the hindi string.

but this funciton sometime work and some time won't work,

because I found one time it was working, but if I use the same funciton again, I found it is displaying "hindi string" with values such as

??????? for each character, when I toggle from

setlocale(LC_ALL, "hi_IN.utf8");


setlocale(LC_ALL, "en_US.UTF-8");

It start displaying hindi string as well.

Can anybody suggest me the correct way or where I am wrong; I would like to display hindi or english on my linux command terminal with user choice.I would like to also log the information in to a text file, i.e hindi messages in to text file too.

Thanks & Regards