gooly:
we heard mt4 is now UTF8.
2) How do I open a bin File in UTF8?string allLines[], f = FileReadString(hdl,(int)FileSize(hdl));
- Since February 3, 2014 (Build 600) Strings are Unicode What's New in MQL4 - MQL4 Documentation Upgrade to MetaTrader 4 Build 600 and Higher - MQL4 Articles
- If you read the documentation FileOpen - File Functions - MQL4 ReferenceFILE_BIN binary read-write mode (no conversion from a string and to a string)You would know. There is no UTF8/UTF16 in binary files. You must convert the characters yourself CharArrayToString - Conversion Functions - MQL4 Reference
- Alternatively if there is only character data, open the file as ANSI.
Ok,
I gave up using (reading, writing) UFT-8 files.
It reminds me of the problem I had to sign a powershell script - the script has to loaded and saved (by e.g. Notepad++) as ANSI otherwise it isn't working!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
we heard mt4 is now UTF8.
So I have a file save as a utf-8 file from Notepad++. Its first line in Notepad++, in Windows' Editor and Word Pad begins with
Sugar; ...
BUT if I open it like this:
I see that now the 1st line starts with:
Sugar; ...
As this looks pretty much like an ANS-ASCII-UTF-8 missmatch saved it as from Notepad++ as ANSI and I don't have the problem, the first line start with
Sugar; ...
1) I thought mt4 is on UTF8 - ???
2) How do I open a bin File in UTF8?
If I try:
no change as before CP_UTF8 has to be set a delimiter, so I tried:
But now the first Line begins with:
¿Sugar; ...
Not really what I want and what I need.
Does anybody know how do I open files to read and to write in bin-mode and UTF-8?