poojapatel
April 20th, 2005, 07:23 AM
Hi Friends
I had problem in reading a file which is in unicode format .
Even i am reading file using unicode commands it returns junk characters.
FILE *fPLog = fopen("D:\\Jitendra\\MSILog.txt","r");
WCHAR chBuffer[100] = L"";
if(fPLog)
{
while( !feof(fPLog) )
{ wscanf(fPLog,L"%hS",chBuffer);
wprintf(L"%hS\n",chBuffer);
}
fclose(fPLog);
}
i had written the above code and i get two junk characters and then all time i get the space in wprintf() function. plz help me to read the file it is very urgent.
if there is any ohter way then also you can suggest me, I am devloping in VC++ with console application.
Thanks in Advance.
With Regards
Jitendra Patel
I had problem in reading a file which is in unicode format .
Even i am reading file using unicode commands it returns junk characters.
FILE *fPLog = fopen("D:\\Jitendra\\MSILog.txt","r");
WCHAR chBuffer[100] = L"";
if(fPLog)
{
while( !feof(fPLog) )
{ wscanf(fPLog,L"%hS",chBuffer);
wprintf(L"%hS\n",chBuffer);
}
fclose(fPLog);
}
i had written the above code and i get two junk characters and then all time i get the space in wprintf() function. plz help me to read the file it is very urgent.
if there is any ohter way then also you can suggest me, I am devloping in VC++ with console application.
Thanks in Advance.
With Regards
Jitendra Patel