fpSpread and CSV lazarus / 49-FPSpreadsheet ---------------------------------------------------------------------- kjteng · 2020-08-07 16:01 May I know whether the following are the normal behaviour, or is there anything wrong with my installation  (eg. wrong version) :- 1. WriteToFile(csvname, sfCSV) -- output files are separated by ';' (semi-colon) instead of comma.  Similarly, ReadFromFile method assumes the separator is ';' ?  (unless I set  CSVParams.Delimiter := ',') 2. ReadFromFile method cannot correctly read utf8-csv file unless I set CSVParams.Encoding to 'utf8'. I thought the reader will detect the encoding automaticaly by default? Thank you. ---------------------------------------------------------------------- wp · 2020-08-07 17:06 (1) The CSVOptions work like a "state machine". You change one settings, and it will be used for all read/write operations until you change it again. Since reading and writing of CSV share the same delimiter your observation is correct. (2) Since CSV files do not contain information about the encoding (except for the BOM in some cases) there is no way how to detect the encoding (without a complex semantic analysis). This is the order of priorities, taken from the fpsCSV source: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   if CSVParams.Encoding = '' then    encoding := GuessEncoding(s)  else    encoding := CSVParams.Encoding;  if encoding = '' then    encoding := DEFAULT_ENCODING;