Hello all,
I have a question about Far3's automatic codepage detection: Is there a way to completely turn it off? I'd like the editor behave like Far2's and just display everything as ANSI (e.g. to see Unicode BOMs). Turning off codepage autodetection and setting the default codepage to ANSI (both in the editor settings) did not work.
Cheers,
zb!
Far3 Internal Editor - Codepage auto-detection
-
- Posts: 6819
- Joined: Thu 23 Mar, 2006 21:36
- Location: Israel
- Has thanked: 41 times
- Been thanked: 528 times
Re: Far3 Internal Editor - Codepage auto-detection
I've no answer to the main question. With regards to BOMs, there are 2 methods I use:zb! wrote:(e.g. to see Unicode BOMs)
1. If I just want to know whether the BOM is present I press ShiftF2 and observe the checkbox
[ ] Add signature (BOM)
If it is checked then the BOM is present.
2. Open the file in Viewer (or press F6 when in Editor), then switch to hex mode (press F4). Then you are able to see the BOM if it is present.
Re: Far3 Internal Editor - Codepage auto-detection
Thanks for those suggestions, I was only aware of the second one.
The thing is: My intent to have to editor display what actually is in the file and not interpret anything. I also would have thought that this is the purpose of the "Autodetect code page" and "Default code page" settings - do I understand that wrong?
The thing is: My intent to have to editor display what actually is in the file and not interpret anything. I also would have thought that this is the purpose of the "Autodetect code page" and "Default code page" settings - do I understand that wrong?
-
- Posts: 6819
- Joined: Thu 23 Mar, 2006 21:36
- Location: Israel
- Has thanked: 41 times
- Been thanked: 528 times
Re: Far3 Internal Editor - Codepage auto-detection
I think it is not always possible in Far 3, there is no "raw" mode in the editor. If you can switch via ShiftF8 to any 1-byte encoding (e.g. code page 437), you get it. But if the editor issues a warning then saving the file will corrupt its contents.zb! wrote:My intent to have to editor display what actually is in the file and not interpret anything.
Re: Far3 Internal Editor - Codepage auto-detection
That would be really unfortunate. What is it supposed to mean if i setup the editor like this, then?Shmuel wrote:I think it is not always possible in Far 3, there is no "raw" mode in the editor.
- John Doe
- Бюрократ
- Posts: 13807
- Joined: Wed 27 Apr, 2005 20:42
- Has thanked: 73 times
- Been thanked: 426 times
- Contact:
Re: Far3 Internal Editor - Codepage auto-detection
AFAIK there are 2 separate autodetection stages:
1. Check if file has BOM. If BOM is found then file supposed to be unicode. If not then goto stage 2
2. Heuristic codepage detection (mozilla UCD)
Only 2st stage is optional.
But it is still possible to avoid 1st stage:
- press ShiftF4 to open "Open/create file" dialog.
- press ShiftEnter to insert current filename
- select ANSI from "Code page" combobox
Even more: you can record keyboard macro to automate all these actions.
1. Check if file has BOM. If BOM is found then file supposed to be unicode. If not then goto stage 2
2. Heuristic codepage detection (mozilla UCD)
Only 2st stage is optional.
But it is still possible to avoid 1st stage:
- press ShiftF4 to open "Open/create file" dialog.
- press ShiftEnter to insert current filename
- select ANSI from "Code page" combobox
Even more: you can record keyboard macro to automate all these actions.