840 xml file error in quick viewer

Bugs and issues.
Post Reply
Message
Author
rjut
Posts: 27
Joined: 11.08.2018, 13:48

840 xml file error in quick viewer

#1 Post by rjut » 02.01.2021, 18:12

Sometimes the FC quick viewer gives an error for a file with an xml extension.
I have discovered 2 situations where the errors occurs:

1 - the xml file is encoded as UTF-16 / UCS-2. So 2 byte per character. But encoding was not defined in the header, it simply states: "<?xml version="1.0"?>"
I discovered this error when trying to view the "FreeCommander.fav.xml" file in the settings folder. This results in an error in the quick viewer:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
A name was started with an invalid character. Error processing resource 'file:///D:/Muziek/New/FreeCommander.fav.xml'. Lin...

When I changed the header to "<?xml version="1.0" encoding="UCS-2" ?>" the error disappeared and the contents was displayed correctly (in xml markup format) in the viewer.
Note that this error occurred on the settings file of FC. When I started FC with default settings this error did NOT occur. The new fav.xml file is encoded UTF-8. Do not know why my fav.xml file is now encoded as UTF-16. Of course over the years have done many updates. I could solve this by adding encoding="UTF-8" to the header and saving as UTF-8 (using Notepad++).
PS The windows explorer pre viewer also showed "This file can't be previewed" as an error.

2 - a doc type definition file is defined in the header "<!DOCTYPE language SYSTEM "language.dtd">.
This results in an error in the quick viewer:
The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
Access is denied. Error processing resource 'language.dtd'. Error processing resource 'file:///D:/Muziek/New/arduino-view ...
<!DOCTYPE language SYSTEM "language.dtd">

It looks like the viewer is trying to use the language.dtd file but cannot find it in the context of the FC environment.
PS The windows explorer was able to preview this file.
I was not able to solve this. Is it possible in this case that the viewer ignores the dtd file if not found?
FreeCommander XE 2023 Build 894 64-bit donor, Windows 11 Pro 22H2

rjut
Posts: 27
Joined: 11.08.2018, 13:48

Re: 840 xml file error in quick viewer

#2 Post by rjut » 28.02.2021, 11:01

Checked again in latest version 844 and this still happens.
Is there any news on this?
FreeCommander XE 2023 Build 894 64-bit donor, Windows 11 Pro 22H2

Karol
Posts: 963
Joined: 19.08.2007, 12:05

Re: 840 xml file error in quick viewer

#3 Post by Karol » 03.03.2021, 13:27

PS The windows explorer was able to preview this file.
You can try to move the ".xml" extension from the field "as Imternet/Office" into "as Windows preview" in the viewer settings.

Odamn-Ete
Posts: 270
Joined: 28.06.2017, 07:10

Re: 840 xml file error in quick viewer

#4 Post by Odamn-Ete » 04.03.2021, 02:23

rjut wrote: 02.01.2021, 18:12 Sometimes the FC quick viewer gives an error for a file with an xml extension.
I have discovered 2 situations where the errors occurs...
Hey rjut,
I would consider this behavior to be the desired behavior. The viewer is telling you, there is a syntax error in the xml file.

You can then view it as text or as windows preview.
This is fast and easy if you have the toolbar in the viewer showing, just click on the appropriate icon.

I would refrain from moving the .xml extension in the viewer settings, because you would not be able to enjoy this feature of the viewer in FC.

An example,

I've found a similar xml file that throws an error in the viewer as you have described in 2 above (doc type definition).
If I edit this file in Notepad++ (plugin "XML Tools" is installed and "automatic xml syntax check" is enabled)
Then Notepad++ will also throw the error about not being allowed to use a DTD.

IMHO Marek has got it exactly like it should be in this case.

Best regards,

rjut
Posts: 27
Joined: 11.08.2018, 13:48

Re: 840 xml file error in quick viewer

#5 Post by rjut » 16.10.2021, 12:20

Ok, if this is the way it should be working then ok. It was just confusing to me. Especially because it happened on an FC configuration file. Maybe caused by many new iterations of FC working with old ini files. Anyway thanks for the response.
FreeCommander XE 2023 Build 894 64-bit donor, Windows 11 Pro 22H2

rjut
Posts: 27
Joined: 11.08.2018, 13:48

Re: 840 xml file error in quick viewer

#6 Post by rjut » 20.05.2023, 10:20

Old thread but in the current 889 version the FreeCommander.fav.xml file is still saved (after a change to the favorites) by FC as an UTF-16 file. But the header line is simply <?xml version="1.0">. Thus leading to an error in the quick viewer.
FC did the same when I used /newini.
Can you update FC to correctly write the xml?
FreeCommander XE 2023 Build 894 64-bit donor, Windows 11 Pro 22H2

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests