Odd behavior with Quick Viewer identifying file types

Discussion, questions and support.
Post Reply
Message
Author
catweazle9
Posts: 23
Joined: 30.03.2009, 10:37

Odd behavior with Quick Viewer identifying file types

#1 Post by catweazle9 » 17.12.2017, 16:35

I have an odd issue when searching for text through all csproj files (XML files for MSBuild) within a directory tree.

In the search results I select a csproj file and press Ctrl+q to view the matching text in the file. This works fine when the file has a byte-order marker (BOM) and the matching text is shown in the quick viewer pane on the right. However, if the file does NOT include a BOM, it is displayed in a different font (showing colors) but does not scroll to the matching text.

Using the (full) Viewer (F3) indicated the following:
  • *.csproj file with BOM: displayed in "RTF/Utf-8" format
  • *.csproj file without BOM: displayed in "Internet" format
What is meant by "Internet" format and why does the Viewer display *.csproj files using this format?

I tried changing the Viewer settings to specify .csproj to be treated as text, but this didn't seem to take effect. The setting would be lost after restarting FreeCommander. I then tried manually editing FreeCommander.ini (after first closing FreeCommander) and adding .csproj to ExtList4TxtView:

Code: Select all

 ExtList4TxtView=.txt.ini.log.def.bat.cmd.url.sql.csproj.
The setting then persisted in the ini file but FreeCommander ignored it and still insisted on displaying csproj files (without a BOM) using "Internet" format.

I finally managed to work around the issue by instead adding csproj to ExtList4RtfView:

Code: Select all

ExtList4RtfView=.rtf.csproj.
Can anyone explain what's happening here? Why does text view not work for csproj files, and why do I need to configure them to be viewed as Rtf files so that when I press Ctrl+q the matching search text is scrolled into view and highlighted?

Thanks,

--- John.

Marek
Author
Author
Posts: 3973
Joined: 10.04.2006, 09:48
Location: Germany
Contact:

Re: Odd behavior with Quick Viewer identifying file types

#2 Post by Marek » 19.12.2017, 21:08

I think the option "Auto-detect text file" is active.
In the case FreeCommander detects rtf files (based on BOM).
Without BOM, the file is probably recognized as xml and showed in browser.

You have defined csproj for rtf view and it is correctly in your case.

catweazle9
Posts: 23
Joined: 30.03.2009, 10:37

Re: Odd behavior with Quick Viewer identifying file types

#3 Post by catweazle9 » 20.12.2017, 10:57

Thanks for the reply. I've now removed "xml" from the file types treated as "Internet" so that other XML files (such as *.proj and *.config) are not shown in the browser.

It seems a little odd that the presence of a BOM triggers FreeCommander to treat the file as RTF, as many different file types may have a BOM. Maybe there's some other way to detect RTF8?

Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests