Page 1 of 1

1.9.5: File listling generator's CSV files are invalid

Posted: Fri Nov 28, 2025 5:39 pm
by Fleet Command
XnView: MP 1.9.5 - 64 bit
OS: Windows x64

XnView MP can generate a list of files, which includes the user-selected fields for each file. One of the supported export formats is CSV. This format uses the colon (:) as the delimiter and double quotation marks (") as the text qualifier, meaning that each field is wrapped in a pair of quotation marks and separated by a colon.

The trouble begins when XnView MP exports fields that contain double quotation marks. XnView MP doesn't add escape characters before them.
To reproduce:
  1. Open XnView MP
  2. Navigate to a folder whose images contain GPS data. (Select the folder or all of its content.)
  3. From the menu bar, select "Create" > "File listing...".
  4. Set the export format to CSV.
  5. Export the following fields:
    1. {Directory}
    2. {Filename With Ext}
    3. {EXIF:Latitude} ({EXIF:Latitude(f)})
    4. {EXIF:Longitude}({EXIF:Longitude(f)})
  6. Save the result as CSV.
Actual behaviour (bug):

This is an example of the exported file. Unfortunately, it is unreadable in Microsoft Excel because the quotation marks in DMS coordinates aren't properly escaped.

Code: Select all

"Directory":"Filename With Ext":"EXIF:Latitude (EXIF:Latitude(f))":"EXIF:Longitude(EXIF:Longitude(f))"
"Z:\DeviantArt.com\":"29550357.avif":"46° 46' 51.39" (46.78094)":"23° 35' 22.54" (23.58959)"
"Z:\DeviantArt.com\":"55366652.avif":"46° 46' 23.70" (46.77325)":"23° 35' 39.42" (23.59428)"
"Z:\DeviantArt.com\":"55988168.avif":"46° 46' 23.84" (46.77329)":"23° 35' 39.65" (23.59435)"
"Z:\DeviantArt.com\":"60065024.avif":"46° 46' 23.90" (46.77331)":"23° 35' 39.66" (23.59435)"
"Z:\DeviantArt.com\":"60882397.avif":"46° 46' 23.97" (46.77332)":"23° 35' 39.72" (23.59437)"
"Z:\DeviantArt.com\":"70796850.avif":"46° 46' 23.97" (46.77332)":"23° 35' 39.72" (23.59437)"
"Z:\DeviantArt.com\":"76995314.avif":"46° 46' 51.09" (46.78086)":"23° 35' 22.40" (23.58956)"
"Z:\DeviantArt.com\":"76994994.avif":"46° 46' 51.14" (46.78087)":"23° 35' 22.38" (23.58955)"
"Z:\DeviantArt.com\":"72918760.avif":"46° 46' 51.09" (46.78086)":"23° 35' 22.40" (23.58956)"
Expected behaviour:

The following is an altered version of the above, with escape characters properly applied.

Code: Select all

"Directory":"Filename With Ext":"EXIF:Latitude (EXIF:Latitude(f))":"EXIF:Longitude(EXIF:Longitude(f))"
"Z:\DeviantArt.com\":"29550357.avif":"46° 46' 51.39"" (46.78094)":"23° 35' 22.54"" (23.58959)"
"Z:\DeviantArt.com\":"55366652.avif":"46° 46' 23.70"" (46.77325)":"23° 35' 39.42"" (23.59428)"
"Z:\DeviantArt.com\":"55988168.avif":"46° 46' 23.84"" (46.77329)":"23° 35' 39.65"" (23.59435)"
"Z:\DeviantArt.com\":"60065024.avif":"46° 46' 23.90"" (46.77331)":"23° 35' 39.66"" (23.59435)"
"Z:\DeviantArt.com\":"60882397.avif":"46° 46' 23.97"" (46.77332)":"23° 35' 39.72"" (23.59437)"
"Z:\DeviantArt.com\":"70796850.avif":"46° 46' 23.97"" (46.77332)":"23° 35' 39.72"" (23.59437)"
"Z:\DeviantArt.com\":"76995314.avif":"46° 46' 51.09"" (46.78086)":"23° 35' 22.40"" (23.58956)"
"Z:\DeviantArt.com\":"76994994.avif":"46° 46' 51.14"" (46.78087)":"23° 35' 22.38"" (23.58955)"
"Z:\DeviantArt.com\":"72918760.avif":"46° 46' 51.09"" (46.78086)":"23° 35' 22.40"" (23.58956)"


Re: 1.9.5: File listling generator's CSV files are invalid

Posted: Fri Nov 28, 2025 9:11 pm
by michel038
Right...
A workaround :
{EXIF:Latitude}" ({EXIF:Latitude(f)})
{EXIF:Longitude}" ({EXIF:Longitude(f)})

Re: 1.9.5: File listling generator's CSV files are invalid

Posted: Sat Nov 29, 2025 10:10 am
by Fleet Command
michel038 wrote: Fri Nov 28, 2025 9:11 pm Right...
A workaround :
{EXIF:Latitude}" ({EXIF:Latitude(f)})
{EXIF:Longitude}" ({EXIF:Longitude(f)})
This workaround breaks every other item in the list that has no GPS data. And it doesn't do any good for other fields, e.g., "comment", "software", or "copyright", which frequently have a quotation mark somewhere in the middle. Thankfully, I have an actual workaround. For the time being, I export the data as XML and then convert it to CSV using another tool. It's slow, but reliable.

Also, please bear in mind that until the issue is resolved, each time I recommend XnView MP, I have to mention that the CSV exporter is broken.