antares-sql / antares

A modern, fast and productivity driven SQL client with a focus in UX

Home Page:https://antares-sql.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSV export does not escape strings when needee

64knl opened this issue · comments

Describe the bug
When using the option to export a table as CSV file, fields containing the separator value are not properly exported and result in extra columns when opening in spreadsheet software.

To Reproduce
Steps to reproduce the behavior:

  1. Create table with data:
CREATE TABLE `test` (
  `string` varchar(255) NOT NULL,
  `another_string` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

INSERT INTO `test` (`string`, `another_string`) VALUES
	("Mozilla/5.0 (Linux; Android 14; SAMSUNG SM-A528B) AppleWebKit/537.36 (KHTML", "Some"),
	("One,Not two", "Two");
  1. Now export the table to CSV
  2. See result:
string;another_string
Mozilla/5.0 (Linux; Android 14; SAMSUNG SM-A528B) AppleWebKit/537.36 (KHTML;Some
One,Not two;Two
  • App client MySQL
  • App version 0.7.22

Environment (please complete the following information):

  • OS name: Ubuntu 23.10
  • DB name: MariaDB