Hi,
I have a csv file encoded UTF-8 from Scheduled Search. And MS Excel couldn't read the file Because without BOM I guess. How can I export csv file with BOM ??
I searched on Splunk and found this.
http://answers.splunk.com/answers/5610/can-the-export-function-export-csv-file-in-big5-charset
In the file
$SPLUNK_HOME/lib/python2.6/site-packages/splunk/appserver/mrsparkle/controllers/search.py
go to around line 266, where the
statement output = job.getFeed(asset,
http_method=jobFeedRequestMethod,
**kwargs) is.
Add the following code after that
line:
if 'isDownload' in kwargs:
import codecs
output = "".join((codecs.BOM_UTF8, output))
This should allow the files to be read
by Excel.
But My Python version is 2.7. So the code of Search.py is different.
How can I get CSV with BOM??
Regards,
Sam
... View more