FAR Alt codes give out always ANSI chars, why?

You want to talk about Far Manager, but don't know where to turn?
Post Reply
DanielK
Posts: 6
Joined: Mon 07 Apr, 2014 11:55

FAR Alt codes give out always ANSI chars, why?

Post by DanielK » Mon 07 Apr, 2014 13:29

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?

DanielK
Posts: 6
Joined: Mon 07 Apr, 2014 11:55

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

Post by DanielK » Mon 07 Apr, 2014 13:47

[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?

User avatar
John Doe
Бюрократ
Posts: 11419
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 17 times
Been thanked: 101 times

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

Post by John Doe » Mon 07 Apr, 2014 13:57

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.

DanielK
Posts: 6
Joined: Mon 07 Apr, 2014 11:55

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

Post by DanielK » Mon 07 Apr, 2014 14:50

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.

2useven10
Posts: 3045
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 83 times

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

Post by 2useven10 » Mon 07 Apr, 2014 15:53


DanielK
Posts: 6
Joined: Mon 07 Apr, 2014 11:55

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

Post by DanielK » Mon 07 Apr, 2014 16:41

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...

2useven10
Posts: 3045
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 83 times

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

Post by 2useven10 » Mon 07 Apr, 2014 16:54

AFAIK - No.
It is always interpreted as Alt+Ins that starts farmanager screen grabber.

DanielK
Posts: 6
Joined: Mon 07 Apr, 2014 11:55

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

Post by DanielK » Mon 07 Apr, 2014 17:03

So if I want to put euro sign (0x0080) I'm out of luck?

User avatar
John Doe
Бюрократ
Posts: 11419
Joined: Wed 27 Apr, 2005 20:42
Has thanked: 17 times
Been thanked: 101 times

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

Post by John Doe » Mon 07 Apr, 2014 17:04

just use unicode code for it

2useven10
Posts: 3045
Joined: Mon 07 Sep, 2009 10:40
Has thanked: 2 times
Been thanked: 83 times

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

Post by 2useven10 » Mon 07 Apr, 2014 17:16

John Doe wrote:just use unicode code for it
Yes... 0x20AC = Alt+[8][3][6][4]

Post Reply

Return to “General Discussions”