Errors, bugs, questions - page 867

 

Good afternoon.

Reinstalled the system. I have installed MT5 from scratch. As it turned out, the demo server has changed. It is FXCM-MT5Demo01 now, I don't know what was the old one before. So my old demo account did not work.

I registered a new demo account. Before, if you scroll to the left of the story, it will finish it. On this server there is nothing at all. I switched timeframes and the history is not downloaded.

There is nothing before 02.10.2012. When I test some standard Expert Advisor of the complex, it is not downloaded when I set the timeframe to a year.

Please advise how to download the story or give me the address of the old demo server.

Win 7 Max Rus SP1 x64, standard firewall is disabled, Avast free 7.0.1466 (switch on and off) MT5 v.5.00 Build 712 (10/12/2012)

When opening "About" window in MT5, I can't Alt+Tab.

 
Vladon:

I was in the site profile, it was full and I did not touch it, then today I was doing work - and the tablet is silent,

I thought what's up - then I went to the site and my ID wasn't there.

Filled out a new one, I can not say it has changed or not, in my opinion the numbers are the same.

Do you currently receive any notifications?
 
PVOID:
Are the notifications coming to you at the moment?
Yes, after re-entering it on the website.
 

Who understands, is this the correct result?

Code:

   ushort Var=1040;
   Alert("1: "+StringFormat("%c",Var));
   
   uchar Var2=192;
   Alert("2: "+StringFormat("%C",Var2));   
   
   Alert("3: "+ShortToString(Var)+" "+CharToString(Var2));

The result is:

ShortToString(Var) and CharToString(Var2) worked correctly, both gave a Russian "A".

But why doesn'tStringFormat("%C",Var2) give a Russian "A"?

It is written in the help:

c

int

Short (Unicode) character type.

C

int

Char (ANSI) character type

 
Integer:

But why doesn't StringFormat("%C",Var2) give a Russian "A"?

Most probably StringFormat works with UTF-7, and CharToString with current Windows charset. That's why it gives such a result.

For example:

uchar ar[1];
ar[0]=192;
Print(CharArrayToString(ar,0,WHOLE_ARRAY,CP_UTF7)," ",CharArrayToString(ar,0,WHOLE_ARRAY,CP_ACP));
À À

The question arises why CharArrayToString has the option to select the code page, while CharToString does not?

 
avoitenko:

StringFormat most likely works with UTF-7, which is why it produces this result.

For example:

À À

The question is whyCharArrayToString has a charset selection option, but CharToString does not?


It seems to be so, but it is written in the help about ANSI:

C int Char (ANSI) character.

So written in help should be understood as "C int character of char (ANSI) type, but still from UTF table"? What is the meaning of such a thing, that's what's not clear.

 
Integer:

So the help text should be understood as "C int character of char (ANSI) type, but still from UTF table"? What is the meaning of this, that is not clear.

If I were the developer, I would replace StringFormat for %C with the current Windows encoding instead of UTF-7,

so that the result would be identical to when calling CharToString.

 
avoitenko:

If I were the developer, I would set the StringFormat for %C to the current Windows encoding instead of UTF-7,

so that the result is the same as when calling CharToString.

And I thought so, maybe a bug?
 
Integer:

Who understands, is this the right result?


We simply translate (with fatal error checking) the parameters into the appropriate CRT function.
 
Integer:

Who understands, is this the right result?

Thank you for raising the issue. We will fix this behaviour in one of the upcoming builds. There will be a conversion according to CP_ACP