MetaEditor save file as binary type?

 

Hi at all,


I use MetaEditor when i work from my personal work station,

repository type git, on bitbucket.com.

But MetaEditor save file mq4/mqh ecc ecc as binary type ???? No in text type ???


After working, i must create a file .txt, put all code inside, create a new name (es.: myWorkEA_last.txt ), set it as .mq4, and after i can commint/push in repository


Thanks a Lots

 
MetaEditor is working with text file (mqh, mq4/mq5). When compiled, of course, it produces binary files (ex4/ex5).
 
E.Dantes:

Hi at all,


I use MetaEditor when i work from my personal work station,

repository type git, on bitbucket.com.

But MetaEditor save file mq4/mqh ecc ecc as binary type ???? No in text type ???


After working, i must create a file .txt, put all code inside, create a new name (es.: myWorkEA_last.txt ), set it as .mq4, and after i can commint/push in repository


Thanks a Lots


Check source file encoding. 

There is a "Save As Unicode"  option on the file menu. Try that.

 
Drazen Penic:


Check source file encoding. 

There is a "Save As Unicode"  option on the file menu. Try that.

Isnt' always in Unicode ? Doesn't change anything for me.
 

In my quick test on MT4:

1. MetaEditor will create a utf-8 encoded file if you use the wizard to create a file.

2. If you save as unicode, the fileencoding is utf-16le.

This is what I would expect. This is also the same behavior on MT5.


git can store either of these types.

However, git will not "diff" unicode directly. For that you can setup a different editor as your difftool. For example:


# Set up the difftool for unicode
$ git config --global diff.tool vimdiff
 
Anthony Garot:

In my quick test on MT4:

1. MetaEditor will create a utf-8 encoded file if you use the wizard to create a file.

2. If you save as unicode, the fileencoding is utf-16le.

This is what I would expect. This is also the same behavior on MT5.

Right. I should have made an error on my first test.
 
Anthony Garot:

In my quick test on MT4:

1. MetaEditor will create a utf-8 encoded file if you use the wizard to create a file.

2. If you save as unicode, the fileencoding is utf-16le.

This is what I would expect. This is also the same behavior on MT5.


git can store either of these types.

However, git will not "diff" unicode directly. For that you can setup a different editor as your difftool. For example:

# Set up the difftool for unicode
$ git config --global diff.tool vimdiff

THANKS a lot @Anthony Garot !

THIS IS THE SOLUTION !


But, git see others files as binary....

Can i set git vimdiff for every file ?


thanks

Reason: