1.9.5: File listling generator's CSV files are invalid
Posted: Fri Nov 28, 2025 5:39 pm
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:
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.
Expected behaviour:
The following is an altered version of the above, with escape characters properly applied.
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:
- Open XnView MP
- Navigate to a folder whose images contain GPS data. (Select the folder or all of its content.)
- From the menu bar, select "Create" > "File listing...".
- Set the export format to CSV.
- Export the following fields:
- {Directory}
- {Filename With Ext}
- {EXIF:Latitude} ({EXIF:Latitude(f)})
- {EXIF:Longitude}({EXIF:Longitude(f)})
- Save the result as CSV.
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)"
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)"