Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

CSV Encoding
#1

i run a command line SIW which then FTP's the exported CSV file to my server.  I then have an AWK script that i run on the Linux server to parse the CSV...  However after the latest update, it quit working and i was trying to find out why..  

My Command:
siw.exe /log:csv=logs\%name%_siw.txt /ftp=Server /ftpUser=User /ftpPass=MySuperSecret /silent /s:1073741825 /h:1185739

after looking at the current exported CSV file, and a previous one, i noticed that the encoding seems different,  how can i change this.. The one on the left is a good one.

[Image: siw-csv-report.jpg]
Reply
#2

(03-15-2020, 05:58 AM)mtsoule Wrote:  i run a command line SIW which then FTP's the exported CSV file to my server.  I then have an AWK script that i run on the Linux server to parse the CSV...  However after the latest update, it quit working and i was trying to find out why.. 

My Command:
siw.exe /log:csv=logs\%name%_siw.txt /ftp=Server /ftpUser=User /ftpPass=MySuperSecret /silent /s:1073741825 /h:1185739

after looking at the current exported CSV file, and a previous one, i noticed that the encoding seems different,  how can i change this.. The one on the left is a good one.

[Image: siw-csv-report.jpg]


SIW saves CSV reports as UNICODE (with BOM).
You can convert the file (on Linux) using iconv:
iconv -f UNICODE -t ISO-8859-15 siw-csv-report.csv >old-format-siw-csv-report.csv
Reply
#3

Yes, i thought about that... was just hoping to avoid another step.. No worries, all good!
Reply




Users browsing this thread: 1 Guest(s)