Download MetaTrader 5

why MT5 exports file in unicode?

To add comments, please log in or register
Mihai Ionescu
1417
Mihai Ionescu  

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? 

Please? 

Bogdan Tenea
202
Bogdan Tenea  

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

http://mqlmagazine.com/mql-programming/dll-hell-mql5-edition-unicode-vs-ansi

DLL Hell, MQL5 edition : UNICODE vs ANSI | MQLmagazine.com
  • mqlmagazine.com
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
Admin
12067
Rashid Umarov  
Mihai Ionescu
1417
Mihai Ionescu  

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
1417
Mihai Ionescu  

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
1417
Mihai Ionescu  

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')
      fascii.write(lineascii)
   
   fascii.close()
   futf.close()

 

To add comments, please log in or register