CSV export does not escape strings when needee
64knl opened this issue · comments
René commented
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:
- 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");
- Now export the table to CSV
- 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