String Concatenation does not happen! and Emojies are not received properly [SOLVED]

 

In the code below:

               for(int j=768; j<780; j+=1)  // 768dec=300H, 1024dec=400H
                 {
                  string strTemp=StringFormat("%I64X", j);
                  strTemp="  \xF"+strTemp;
                  Print(strTemp);
                 }

I get this result:

2020.06.14 02:58:29.259 EA_r1 (XAUUSD,H1)          300
2020.06.14 02:58:29.432 EA_r1 (XAUUSD,H1)          301
2020.06.14 02:58:29.596 EA_r1 (XAUUSD,H1)          302
2020.06.14 02:58:29.756 EA_r1 (XAUUSD,H1)          303
2020.06.14 02:58:29.921 EA_r1 (XAUUSD,H1)          304
.
.
.

Why I can not add  "\xF" and how can I do that?

 
strTemp="  \\xF"+strTemp; // \xF300
 
aboozar sobboohi: Why I can not add  "\xF" and how can I do that?
"  \xF"

That string is two spaces and a Control+F. You want a backslash, lowercase x and uppercase F. Quote the backslash like lippmaje stated.
          Language Basics / Data Types / Integer Types / Character Constants - Reference on algorithmic/automated trading language for MetaTrader 5

 
Aboozar:

Thanks to you, this problem is over. However, its result was not what I expected in receiver. So I created a new post:

https://www.mql5.com/en/forum/344090

Damn it !! Don't do that.

You already have a topic, use it !

 
Aboozar:

Thanks to you, this problem is over. However, its result was not what I expected in receiver. So I created a new post:

I have deleted your new topic.

Please continue in this topic.

 

Ok Keith and Alain! I though it is against rules to continue that problem under this topic subject. Therefore I made a new one!


Now I receive the text "\xF301" but the problem is this is not considered an emoji. However, when I send this  "\xF301" phrase explicitly, it is shown correctly.
 

Maybe this helps:

ushort ch=0x00A9; // Unicode for ©
string str;
StringSetCharacter(str,0,ch);
Print(str); // ©

So you have to find the unicode for your emoji and insert it into a string like above.

 
lippmaje:

Maybe this helps:

So you have to find the unicode for your emoji and insert it into a string like above.

This helped me in another way. Thanks.
Reason: