Do you understand the meaning of ANSI and UNICODE ?
There are no advantages or disadvantages, you just use the one you need.
Do you understand the meaning of ANSI and UNICODE ?
There are no advantages or disadvantages, you just use the one you need.
Sorry, I though it is obvious that I am asking about example scenarios when ANSI is better than UNICODE or vice versa.
In other word, when it is recommended to use ANSI instead of UNICODE or vice versa.
In other word how to determine which one do I need, what are the criterias.
In other word, is there any scenario when one or other can cause error while reading/writing (file format, type of variable for read or write, type destination/source array used for file read/write etc).
Narek Kamalyan:
In other word, when it is recommended to use ANSI instead of UNICODE or vice versa.
In other word how to determine which one do I need, what are the criterias.
- Do you need to write a character beyond the (255) ANSI set? Then you need Unicode.
- Do you have software that can only read ANSI? Then Unicode isn't valid.
- Do you need snow tires? Could you possibly be driving in snowy conditions? Only you know your requirements.
It controls how FlieWriteString() will encode text strings to binary bytes, either as Ansi (1 byte per characte) or unicode. The same thing also for FileReadString(), how it decodes the bytes from Bin file.
This question arised becuase I am facing a strange issue. I used UNICODE in my code and it worked fine until I didnt switch to another broker terminal and read/write string stopped to work, i.e. when write dynamic array and read, all string values became empty. When I switched to ANSI it seems to work on both terminals.
Also another strange thing, when I switched to ANSI, in the new terminal it keeps working incorrectly until I didint restart the terminal.
“Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. 2004
When asking about code
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button).
How To Ask Questions The Smart Way. 2004
Be precise and informative about your problem
We can't see your broken code.
Fix your broken code.
What I want to say is when I use UNICODE to write and read dynamic structure array to and from file, it works in some terminals and doesnt work on other, all of them latest June version. When I say doesnt work, I mean after write and read to/from file, ArrayPrint shows empty elements for all strings. When use ANSI it works. I didnt post any code becuase the problem I have seen on some terminals only, so I am expecting to understand the concept behind this rather than looking for someone to fix my code, I know about No Free Help.
The question is:
There can be difference how different broker terminals are processing such basic functions?
Anyone faced such issue before.
How To Ask Questions The Smart Way. 2004
Don't rush to claim that you have found a bug.
Questions Not To Ask
My program doesn't work. I think system facility X is broken.
It is almost always your code.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello guys
I am working with read/write bin files and would like to know advantages and disadvantages of using FILE_ANSI vs FILE_UNICODE.
MQL5 documentation doesnt provide any detailed documentation except one/two byte symbol usage.