Download MetaTrader 5

why MT5 exports file in unicode?

To add comments, please log in or register
Find out how to install MetaTrader on Mac OS
Mihai Ionescu
Mihai Ionescu 2011.06.15 21:55 

who uses unicode with only digits?

is there anyone who uses this unicode style in financial data? client or developer?

at least, we would be able to select the type of file to export,

not being forced to export in a format which most of us cannot use directly


can someone please shed some light on this decisions for unicode ?

and can you please consider at least exporting choices of both ansi and unicode? 


Bogdan Tenea
Bogdan Tenea 2011.06.25 15:09  

You can use this to convert strings to and from unicode:

DLL Hell, MQL5 edition : UNICODE vs ANSI |
Many many years ago, when we were kids, in the beginning years of the crazy 90s, two languages were in battle in developer world. Pascal, with a down-to-earth, easy to understand syntax, well suited to a high level language, and C++, with a more cryptic, but faster to use syntax, well suited to its medium level. C++ won the battle, and...
Rashid Umarov
Rashid Umarov 2011.06.26 12:56  
Mihai Ionescu
Mihai Ionescu 2011.06.28 15:36  

I was referring to MT5 File menu => Save... submenu

If we have only digits in the exported CSV file, it doesn't make sense to save it in unicode format. Double dimension of the file also.

Do you suggest to make my self a script to save a chart as a csv, in the way I want? 


GoD2.0 Thank you for the link. It's a very useful library in some scenarios.

I wasn't aware of the site also, thanks for it too :)  

Mihai Ionescu
Mihai Ionescu 2011.09.09 20:11  

I dropped this issue, but now I'm confronted with it again.

What byte order mask is there when we save a chart as unicode? 

And when I say save, I mean File menu -> Save... submenu


Can there be an option to save to ansi / ascii csv file?

I'm still mot being able to convert automatically this type of unicode file into ansi, programatically.



Mihai Ionescu
Mihai Ionescu 2011.09.09 21:07  

I've succeeded in the end with python

Here's the code for anyone who would need/like it:

def utf2ascii(fnameutf,fnameascii):
   futf = open(fnameutf,'r')
   fascii = open(fnameascii,'w')
   for line in futf:
      lineascii = line.strip()
      lineascii = string.translate(line,None,'\xff\xfe\x00')


To add comments, please log in or register