Page 1 of 1

Document Viewer (text) doesn not linewrap

Posted: 30.05.2019, 18:01
by LWillms
This should work on typing the letter W, or clicking the corresponding icon in the text viewer. But neither works. The viewer shows text lines in the length as they are stored in the file, but does not break the lines at the right window border.

This happens with FreeCommander XE 2019 Build 798 64-bit donor

Re: Document Viewer (text) doesn not linewrap

Posted: 31.05.2019, 05:15
by LWillms
Maybe Freecommander looks only at the max line length as configured in the Settings (300) instead of the actual width of the viewer's window.

Re: Document Viewer (text) doesn not linewrap

Posted: 31.05.2019, 14:42
by Zorkoff
Both the Quick Viewer and the Document Viewer work correctly for me. Lines are wrapped at the window border by default. Expanding the window expands the wrap point.

FreeCommander 64-bit version 798, Windows 10 1803 64-bit

Re: Document Viewer (text) doesn not linewrap

Posted: 02.06.2019, 17:08
by Zorkoff
If you try to view the ReadMe_XE.txt file which is included in the Portable version of FreeCommanderXE, it will NOT word wrap by default. You must click on the TEXT format icon in the header of the viewer to see the word wrap.

This is because the first 3 bytes of the file are EF BB BF (binary characters). This causes the file to be interpreted as RTF format by the viewer. This can be seen if this file is displayed as binary in the viewer (use the binary format icon in the header).

My initial test was done with a clean text file with long lines that did not start with the binary characters. That file word wrapped just fine.

Each of my text editors were not able to remove the binary characters in ReadMe_XE.txt, there were just ignored. The only way I was able to get around this was to copy all the text after the characters and paste them into another file.

The bottom line is that a file ending in .TXT will not necessarily be detected as a TEXT file, and word wrap may not apply.

Re: Document Viewer (text) doesn not linewrap

Posted: 03.06.2019, 06:08
by LWillms
Zorkoff wrote:
02.06.2019, 17:08
the first 3 bytes of the file are EF BB BF (binary characters). This causes the file to be interpreted as RTF format by the viewer.
This "EF BB BF" is the so called BOM, and in this case identifies the file as encoded in UTF-8. BOM = 'Byte Order Mark'
See https://en.wikipedia.org/wiki/Byte_order_mark

You can force the viewer to interpret the file as encoded in UTF-8 (or UTF-16) by hitting the key R, or selecting RTF/UTF-8 in the "view as" menu.
Zorkoff wrote:
02.06.2019, 17:08
Each of my text editors were not able to remove the binary characters in ReadMe_XE.txt, there were just ignored. The only way I was able to get around this was to copy all the text after the characters and paste them into another file.
You would have to open the file in a text editor, and then save it with a "Save as", selecting a different character encoding than UTF-8, or UTF-8 without BOM.

I use UltraEdit as my main text editor. Now in version 26.10