Page 1 of 1

FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 13:29
by DanielK
Hello,

Why is it not possible to enter OEM characters with Alt codes since version 2 (unicode)?
FAR 1.75.0.2634 works as expected.

No matter if you start your code with 0 or not, it always outputs ANSI 1252 character.

That is:

[Alt]+[2][2][1]
[Alt]+[0][2][2][1]

both output:

û

However, Unicode hex key codes like: [Alt][+][2][2][1][A] work fine.

Why is it so?

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 13:47
by DanielK
[Alt]+[2][2][1]

(without preceding zero)

Should output √ (Square root symbol) which is in OEM codepage 437.
Instead, it outputs û which is located in ANSI Windows codepage 1252.

Why is it so? Am I too stupid to grasp it?

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 13:57
by John Doe
Alt-8730 gives you square root

P.S.
It looks Far accepts only unicode codes.
As I remember there were some discussion on russian forum, but I can't find it now.

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 14:50
by DanielK
I don't speak Russian well enough to find it,
I would be grateful if you could.

I've spent 4 days on researching this, so far...

I've looked at source code to get a clue, but to no avail.

What I want to do is find out if this is a bug or an intended behaviour.

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 15:53
by 2useven10

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 16:41
by DanielK
Thank you for the link. Is it possible to enter Alt codes that start with 0?

For me, FAR appears to interpret the keystrokes as Alt+Insert no matter
if I have NumLock enabled or disabled. Must be hardcoded somewhere...

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 16:54
by 2useven10
AFAIK - No.
It is always interpreted as Alt+Ins that starts farmanager screen grabber.

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 17:03
by DanielK
So if I want to put euro sign (0x0080) I'm out of luck?

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 17:04
by John Doe
just use unicode code for it

Re: FAR Alt codes give out always ANSI chars, why?

Posted: Mon 07 Apr, 2014 17:16
by 2useven10
John Doe wrote:just use unicode code for it
Yes... 0x20AC = Alt+[8][3][6][4]