The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Hello. I use 7.2.14-release and Lazarus 2.2.6. I want to export to csv file with Multibyte character filename.
But the filename is garbled.
with "Utf8ToAnsi" csv file was saved as "縺ゅ≠.csv"
with "WinCpToUtf8" csv file was saved as "邵コ繧・旺.csv"
I want to save as "ああ.csv".
Is there any tips?
ZReadOnlyQuery1.SQL.Add('select * into outfile "'+WinCpToUtf8('c:/works/ああ.csv')+'" from information_schema.columns WHERE table_schema="information_schema" and table_name="files"');
ZReadOnlyQuery1.ExecSQL;
ZReadOnlyQuery1.Close;
meeeeeeeeee wrote: ↑09.08.2024, 03:50
I use 7.2.14-release and Lazarus 2.2.6.
Please switch to more modern versions.
meeeeeeeeee wrote: ↑09.08.2024, 03:50
I want to export to csv file with Multibyte character filename.
But the filename is garbled.
with "Utf8ToAnsi" csv file was saved as "縺ゅ≠.csv"
with "WinCpToUtf8" csv file was saved as "邵コ繧・旺.csv"
I want to save as "ああ.csv".
Is there any tips?
ZReadOnlyQuery1.SQL.Add('select * into outfile "'+WinCpToUtf8('c:/works/ああ.csv')+'" from information_schema.columns WHERE table_schema="information_schema" and table_name="files"');
ZReadOnlyQuery1.ExecSQL;
ZReadOnlyQuery1.Close;
I think, you don't need to call WinCpToUtf8 because according to the FPC / Lazarus Wiki Lazarus will generate UTF-8 encoded files:
Sources should be saved in UTF-8 encoding. Lazarus creates such files by default. You can change the encoding of imported files via right click in source editor / File Settings / Encoding.
Does it work, if you remove the call to WinCpToUtf8?
Hello. I tried with Lazarus v3.2 and ZeosLib 8.0.1-beta.
The file is UTF-8 encoded, and it is fine, but
I just care about the filename.
Alphabet letter filename is ok, but if I use multibyte character filename, the filename is strange.
It is not allowed to use Chinese character or Hiragana as a filename when I export as csv filename?
ZReadOnlyQuery1.SQL.Add('select * into outfile "'+'c:/works/aa.csv'+'" from information_schema.columns WHERE table_schema="information_schema" and table_name="files"');
ZReadOnlyQuery1.ExecSQL;
ZReadOnlyQuery1.Close;
RenameFile('c:/works/aa.csv', 'c:/works/ああ.csv');