CSVDocument wiki says that the library could use UTF-8 encoding. However, when I load a UTF-8 (Urdu) text, I got broken text instead.
for instance: خبریں
got loaded as: â€Ø®Ø¨Ø±ÛŒÚº
Example prog:
program TestCSVDocument;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils, CsvDocument
{ you can add units after this };
{$R *.res}
begin
with TCSVDocument.Create do
try
Delimiter := ';';
LoadFromFile(ParamStr(1));
SaveToFile(ChangeFileExt(ParamStr(1),'.out.csv'));
finally
Free;
end;
end.
The resulting .out.csv file is not identical to the given .csv.