Question : when i use this function in c++ the text have arbic it destroied??

hello

i used this function  to convert the variable from  char*  to TCHAR

but the arabic language in the text it appear with charcter that can't be understand it

TCHAR* urlcnw=A2T(urlcn);

can  any body help me to convert between char*   to TCHAR*

without destroy the arabic langauge???

thank you    

Answer : when i use this function in c++ the text have arbic it destroied??

Why you don't use the code I posted?
If you already took one line, why you cannot apply wcstombs?
How I see it should be something like

_wsetlocale(LC_ALL,  L"arabic");
TCHAR* urlcnw = (wchar_t*)malloc(1024);
urlcnw[0] = 0;
mbstowcs(urlscnw, urlcn, 1000);

Do not forget to delete this urlcnw when you will not need it. It is correct for your code with A2T too.
Random Solutions  
 
programming4us programming4us