Error in compiler or in terminal display?

 

Hello,

I know that it is not such an important question, but:

this simple piece of code should print as output the "white heart suit" ♡ (hex code 2661);

 

void OnStart()
  {
    string test="";
   
   StringSetCharacter(test,0,0x2661);
   Print(test);
   }

 

 Instead what I get is the following displayed output:

 

 
hardhu:

Hello,

I know that it is not such an important question, but:

this simple piece of code should print as output the "white heart suit" ♡ (hex code 2661);

What Font do you think that MT5 is using ?
 
RaptorUK:
What Font do you think that MT5 is using ?

I don't know if it is only a font problem, in fact if I slightly change the code in this way: 

void OnStart()
  {
    string test="";
   
   StringSetCharacter(test,0,0x2661);
   Print(test);
   StringSetCharacter(test,1,0x2662);
   Print(test);
   }

 

 Then I get the correct symbol in the second print output.

 

 

 
hardhu:

I don't know if it is only a font problem, in fact if I slightly change the code in this way: 

Mmmmm,  this might be a bug,  according to the Documentation . . .  "If pos is equal to string length, the specified symbol is added at the string end, and the length is enlarged by one."  

The reason I asked about character set is when I look at  Arial  in charmap I don't find the white heart suit at 0x2661 

 
hardhu:

I don't know if it is only a font problem, in fact if I slightly change the code in this way: 

 

 Then I get the correct symbol in the second print output.

This is clearly a bug. You can write to ServiceDesk.
Get in touch with developers using Service Desk!
Get in touch with developers using Service Desk!
  • www.mql5.com
We therefore attach great importance to all user reports about issues in our programs and try to answer each one of them.