Problems with UTF-8 character encoding during compilation - page 2

 
Fernando Carreiro #:
Yes, but unfortunately even then, the text will not display properly in the MetaTrader log files or on the Chart Comments if the codepage does not match the character set.

In MetaTrader 5 it displays correctly in logs and on the Chart Comments. I think MetaTrader 4 is compiled with Unicode support, so it should display correctly. I don not have MT4.


 
amrali #: In MetaTrader 5 it displays correctly in logs and on the Chart Comments. I think MetaTrader 4 is compiled with Unicode support, so it should display correctly. I don not have MT4.

The issue pertains to MT4 and not MT5. It does not display correctly on MT4, unfortunately.


 
Fernando Carreiro #:The issue pertains to MT4 and not MT5. It does not display correctly on MT4, unfortunately.

Please could you try to encode to UTF16-LE and re-test if this solves the problem.

 
amrali #: Please could you try to encode to UTF16-LE and re-test if this solves the problem.

I have already tried that before. It had no effect.

 

I've tried all the combinations. Saving as UTF-8 with and without BOM, UTF16-LE - none of that helps.

To summarize - ME compiles the same UTF-8 source differently depending on what CP is set in Windows for non-Unicode applications. For me it is a bug.

I have 2 options:

  1. drop Polish national characters - not elegant but convenient
  2. use a VM with different codepage just for compilation and tests of one of these to cp 1250 / 1256 - well, error prone and tedious
P.S. What you see in those screenshots is definitely not Arabic, just garbage ;) My source was 1250 but in such case you will see Polish characters in ME only if your CP in Win is set to 1250.
 
amrali #:

In MetaTrader 5 it displays correctly in logs and on the Chart Comments. I think MetaTrader 4 is compiled with Unicode support, so it should display correctly. I don not have MT4.

MT4 is not a Unicode application. If you switch language in MT4 or ME to the one with character set outside of your regional Windows setting for non-unicode apps you will see garbage instead of national characters.

 
Marcin Madrzak #:

MT4 is not a Unicode application. If you switch language in MT4 or ME to the one with character set outside of your regional Windows setting for non-unicode apps you will see garbage instead of national characters.

MT4 still does not support Unicode standard yet?!!

Too old!

 
amrali #: MT4 still does not support Unicode standard yet?!! Too old!

You do realise that active development on MT4 stopped many years ago, right?

Broker licenses for MT4 also stopped back then. I think it might of been in 2016 maybe.

Reason: