Code is reading news from that source and works fine for mt4. when i use same code on mt5 it is totally wrong. it has kind of encoding problem but i do not know how to fix this.
reading part of code:
void xmlRead()
{
ResetLastError();
int FileHandle=FileOpen(xmlFileName,FILE_BIN|FILE_READ);
if(FileHandle!=INVALID_HANDLE)
{
//--- receive the file size ulong size=FileSize(FileHandle);
//--- read data from the filewhile(!FileIsEnding(FileHandle))
sData=FileReadString(FileHandle,(int)size);
//--- closeFileClose(FileHandle);
if (PrintLogs)
{
Print("News Data writed to sData Correctly!");
Print(sData);
}
}
elsePrintFormat(INAME+": failed to open %s file, Error code = %d",xmlFileName,GetLastError());
}
sData (content of file read from news source) print for Mt4↓
sData (content of file read from news source) print for Mt4↓
I am fetching news from http://nfs.faireconomy.media/ff_calendar_thisweek.xml and it save the file inside terminal/MQL4\Files as FFCPing(Symbol)-ffcal_week_this.xml (eg, FFCPingGBPUSD-ffcal_week_this.xml).
Code is reading news from that source and works fine for mt4. when i use same code on mt5 it is totally wrong. it has kind of encoding problem but i do not know how to fix this.
reading part of code:
sData (content of file read from news source) print for Mt4↓
sData (content of file read from news source) print for Mt4↓