You have encountered a problem using Far Manager? Here you can get help.
pepak
Posts: 604 Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times
Post
by pepak » Tue 23 Aug, 2016 07:07
Hi!
When running FAR in Edit mode (far /e file.txt ), is it possible to specify a default encoding? I can set the default codepage in Options/Editor Settings , but that applies to all FAR windows and I only want to override it for some specific far /e calls.
Pepak
pepak
2useven10
Posts: 5211 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times
Post
by 2useven10 » Tue 23 Aug, 2016 08:37
pepak wrote: is it possible to specify a default encoding?
No. It is impossible now.
CP_DEFAULT (last used file codepage -> autodetection -> default configured codepage) is hardcoded.
2useven10
pepak
Posts: 604 Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times
Post
by pepak » Wed 24 Aug, 2016 19:07
Too bad. It would be very useful for me :-(
pepak
DrKnS
Posts: 6114 Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times
Post
by DrKnS » Wed 24 Aug, 2016 19:27
pepak wrote: is it possible to specify a default encoding?
It is possible:
far.exe /set:Editor.DefaultCodePage=1250 /e file.txt
DrKnS
pepak
Posts: 604 Joined: Sun 13 Jul, 2008 11:18
Has thanked: 17 times
Been thanked: 54 times
Post
by pepak » Wed 24 Aug, 2016 19:33
Wonderful!!! Thanks a lot!!
I had to check and apparently this is missing from FAR's english Help ("Command line switches" section) :-(
pepak
HaRT
Moderator
Posts: 10823 Joined: Tue 30 Aug, 2005 17:21
Has thanked: 221 times
Been thanked: 358 times
Post
by HaRT » Wed 24 Aug, 2016 19:42
pepak wrote: apparently this is missing from FAR's english Help
From the Russian-language one, too.
HaRT
DrKnS
Posts: 6114 Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times
Post
by DrKnS » Wed 24 Aug, 2016 19:47
Help can get out of sync indeed (fixed now), but you can always try far /?
to find out all supported parameters.
DrKnS
Shmuel
Posts: 6820 Joined: Thu 23 Mar, 2006 21:36
Location: Israel
Has thanked: 41 times
Been thanked: 528 times
Post
by Shmuel » Wed 24 Aug, 2016 19:50
You seem to insert English description into Russian help.
Shmuel
2useven10
Posts: 5211 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times
Post
by 2useven10 » Wed 24 Aug, 2016 21:16
DrKnS wrote: It is possible: far.exe /set:Editor.DefaultCodePage=1250 /e file.txt
It has no effect if file codepage history exists or autodetection succeded.
2useven10
2useven10
Posts: 5211 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times
Post
by 2useven10 » Wed 24 Aug, 2016 21:35
Probably it is possible to disable using editor file history and autodetection with another /set:xxx options.
But anyway it will be too complicated. Dedicated command line option /cp:NNNN looks much more natural.
2useven10
DrKnS
Posts: 6114 Joined: Thu 04 Aug, 2005 06:44
Location: Kyiv
Has thanked: 12 times
Been thanked: 426 times
Post
by DrKnS » Wed 24 Aug, 2016 21:52
2useven10 wrote: It has no effect if file codepage history exists or autodetection succeded.
The initial question is "is it possible to specify a default encoding", not "is it possible to force an encoding".
DrKnS
2useven10
Posts: 5211 Joined: Mon 07 Sep, 2009 10:40
Has thanked: 18 times
Been thanked: 310 times
Post
by 2useven10 » Wed 24 Aug, 2016 22:03
DrKnS wrote: The initial question is ...
You are right. I did reinterpret question before answeing it.
2useven10