Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread Bart via fpc-pascal
On Mon, Feb 7, 2022 at 9:54 PM James Richters via fpc-pascal wrote: > The part of my program that checks for the BOM is bigger than the actual CSV > read and write. Please let me know if the crash issue with no BOM gets fixed > so I can delete all this stuff that checks for it. That part can

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread James Richters via fpc-pascal
Thanks for the link and the work around idea. I really don't know what settings I had for the CSV file, I just clicked Save-As and changed it to CSV... I didn't even know there was an ASCII option. The newer versions of Excel make you jump though hoops just to see where on your hard drive you

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread James Richters via fpc-pascal
>I have fixed this in trunk. I updated to the current trunk and indeed your fix has solved the issue... for excel files, however if I try it with a text file.. something that I type in from scratch with a text editor, it crashes with: Running "i:\programming\gcode\1d cut\1d.exe x:\text.CSV" Inp

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Feb 2022, James Richters via fpc-pascal wrote: Strange, I have it here ? Maybe it was introduced later... Maybe I need to use another unit? No. :-( It exists on TCSVParser only, not on TCSVDocument. That's a pity, because TCSVDocument should to pass it on to the TCSVParser. I

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread James Richters via fpc-pascal
>Strange, I have it here ? Maybe it was introduced later... Maybe I need to use another unit? >Notepad++ detects the BOM Marker but obviously does not show it. I even tried going to View and Show Symbol and Show All Characters in Notepadd ++ so I see all the CRs and LFs etc.. but nothing is show

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread Michael Van Canneyt via fpc-pascal
On Mon, 7 Feb 2022, James Richters wrote: I tried this: CSVData:=TCSVDocument.Create; CSVData.DetectBOM := True; CSVData.LoadFromFile(ParamStr(1)); Writeln('Read In: ',CSVData.RowCount,' Rows and ',CSVData.MaxColCount,' Columns');

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread James Richters via fpc-pascal
I tried this: CSVData:=TCSVDocument.Create; CSVData.DetectBOM := True; CSVData.LoadFromFile(ParamStr(1)); Writeln('Read In: ',CSVData.RowCount,' Rows and ',CSVData.MaxColCount,' Columns'); Writeln('Press Enter to Process')

Re: [fpc-pascal] Issue with CSVDocument

2022-02-07 Thread Michael Van Canneyt via fpc-pascal
Hello, Sounds like you have a BOM marker in the file. Set CSVDocument.DetectBOM := True; Michael. On Mon, 7 Feb 2022, James Richters via fpc-pascal wrote: I have CSVDocument working, but something odd is happening. Everything is coming out as I expect, Except for the first cell.. it has

[fpc-pascal] Issue with CSVDocument

2022-02-07 Thread James Richters via fpc-pascal
I have CSVDocument working, but something odd is happening. Everything is coming out as I expect, Except for the first cell.. it has some garbage at the beginning of it that I don't understand. I'm on a Windows 10 64bit PC running the Win32 FPC Trunk installed today with fpcdeluxe. Here's my co

Re: [fpc-pascal] Putting Delimited text into a StringList

2022-02-07 Thread James Richters via fpc-pascal
Yes, that's it, thank you. I see it there on: https://www.freepascal.org/daily/doc/fcl/csvdocument/tcsvdocument.html Source position: csvdocument.pp line 59 For some reason I thought CSVReadWrite was the unit. James ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] Putting Delimited text into a StringList

2022-02-07 Thread Tomas Hajny via fpc-pascal
On 2022-02-07 13:20, James Richters via fpc-pascal wrote: I'm trying to use TCSVDocument, I have: Uses Math,sysutils,Classes,CSVReadWrite; That seems to be fine, But I get an error 1D.pas(18,17) Error: Identifier not found "TCSVDocument" On a line: Var CSVData : TCSVDocument; Do I n

Re: [fpc-pascal] Putting Delimited text into a StringList

2022-02-07 Thread James Richters via fpc-pascal
I'm trying to use TCSVDocument, I have: Uses Math,sysutils,Classes,CSVReadWrite; That seems to be fine, But I get an error 1D.pas(18,17) Error: Identifier not found "TCSVDocument" On a line: Var CSVData : TCSVDocument; Do I need another unit or am I doing something wrong? James