
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
Haven't worked with file operations in a long time... Look, when you use FileOpen() you have a CSV type file declared. It used to specify that all written items are converted to unicode or ansi strings. Maybe this is where the dog is?
Fucking Winnipuh!!!
That's where it's "buried" :) I added the FILE_ANSI parameter and everything went smoothly!
FileOpen("Price Label\\\"+_Symbol+tpl_ext,FILE_READ|FILE_CSV|FILE_ANSI,';',CP_ACP);
Yedelkin ,TheXpert thanks for the tip!!!:)
is_vale:
...From what I can see in debugger (in sTF variable it reads file contents as unicode! When opening the file I've tried all the possible codepages, but the result is the same :( The file itself is written in Windows encoding.
Does anyone have any idea where the problem lies?
By default it's written in UNICODE. So setFILE_ANSI flag:
By default it is written in UNICODE. Therefore set theFILE_ANSI flag:
Question about array[] size: should I set the size of array[] before using it inFileReadArray() or will the "terminal executing system" take care of it?
No, the function will distribute memory for the necessary amount of data in the file.
By the way, you can read arrays of simple structures in the same way, if they were written there.
The FileReadArray() function does not recognize the type of saved data, so be careful, this is one of the features, you can save duplicates and read them as a collocation and parse them into bits.
Cool.
The FileReadArray() function doesn't recognise the type of saved data, so be careful, this is one of the features, you can save duplicates and read them as a floating point and parse them into bits.
So, arrays should be of the same type when saving and reading, right? Is it enough?
Cool.
So the arrays must be of the same type when saving and reading, am I right? Is that enough?
Yes.
The description says:
common_flag
[in] Flag defining the location of the file. If common_flag=FILE_COMMON, the file is in the shared folder of all client terminals. Otherwise the file is in the local folder.
The description says:
If the source file is in a shared folder, then common_flag=FILE_COMMON, that's clear. But if the file is located in a local folder, which flag should be specified? The common_flag parameter is not default, so some value must be specified anyway.