Document Viewer (text) doesn not linewrap

Bugs and issues - current donor version.
Post Reply
Message
Author
LWillms
Posts: 14
Joined: 01.05.2015, 07:52

Document Viewer (text) doesn not linewrap

#1 Post by LWillms » 30.05.2019, 18:01

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

LWillms
Posts: 14
Joined: 01.05.2015, 07:52

Re: Document Viewer (text) doesn not linewrap

#2 Post by LWillms » 31.05.2019, 05:15

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.

Zorkoff
Posts: 106
Joined: 10.05.2011, 21:14
Location: Boston, MA

Re: Document Viewer (text) doesn not linewrap

#3 Post by Zorkoff » 31.05.2019, 14:42

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

Zorkoff
Posts: 106
Joined: 10.05.2011, 21:14
Location: Boston, MA

Re: Document Viewer (text) doesn not linewrap

#4 Post by Zorkoff » 02.06.2019, 17:08

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.

LWillms
Posts: 14
Joined: 01.05.2015, 07:52

Re: Document Viewer (text) doesn not linewrap

#5 Post by LWillms » 03.06.2019, 06:08

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

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests