MySql escaped double quotes in string when exporting to csv
NickName:rusty_shackleford Ask DateTime:2017-12-23T05:04:06

MySql escaped double quotes in string when exporting to csv

I'm am having an issue with a record that contains a set of escaped double quotes inside a string when exporting my result set from MySql to a csv.

The record is showing correctly in the db:

db

however, when I export it to a csv, the result has the opening quote where the closing quote is supposed to be, and the closing quote at the end of the string:

the result has the opening quote where the closing quote is supposed to be, and the closing quote at the end of the string.

Here is the insert statement:

INSERT INTO table_name (hh_name) VALUES ("Sam \"FakeName\" & Lisa Smith");

Is there a way to enter the data so that the csv export shows the same way as it shows up in the db?

Copyright Notice:Content Author:「rusty_shackleford」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/47947370/mysql-escaped-double-quotes-in-string-when-exporting-to-csv

More about “MySql escaped double quotes in string when exporting to csv” related questions

MySql escaped double quotes in string when exporting to csv

I'm am having an issue with a record that contains a set of escaped double quotes inside a string when exporting my result set from MySql to a csv. The record is showing correctly in the db: how...

Show Detail

Replace escaped double quotes in CSV

I am reading content from a csv. I want to replace the single and double quotes from the data. I have tried the following code but is not working. $resource = fopen($this->csv_file, 'r');

Show Detail

Serializing string with escaped double quotes to XML

I have a problem trying to serialize a Java Object to XML using jackson XmlMapper. One of the fields contains a string with escaped double quotes, like this: String example = "This is a string...

Show Detail

Exporting CSV file is not woking with double quotes value

I have a gridview, when I'm exporting this grid to csv format if the table contains double quotes the value data are not shown after the double quotes.(export contains value upto double but not after

Show Detail

Exporting String data from Bigquery to GCS (CSV) without double quotes

I have a concatenated string in a Bigquery table which has double quotes enclosed while exporting data as CSV to GCS. Is there a way I can avoid double quotes in the files?

Show Detail

Parsing CSV file with multiline fields and escaped double quotes

What is the best way to parse a CSV file with multiline fields and escaped quotes? For example, this CSV First field of first row,"This field is multiline but that's OK because it's enclosed in ...

Show Detail

(Escaped) double quotes in string interpolations (in Swift)

Can one use (escaped) double quotes in a string interpolation in Swift? let s = "\(n) \(capitalized ? "H" : "h")ours" produces "Unexpected '"' character in string interpolation (which is

Show Detail

RegEx with escaped double quotes

I have the following RegEx that mostly works for my use cases (CLI command interpreter): [^\s"]+|"[^"\\]*(?:\\.[^"\\]*)*" It matches the following scenarios (and separates parts successfully): foo

Show Detail

Limiting characters in textarea - escaped quotes and double quotes take up 2 characters in MySQL

I want to limit a textarea to a certain number of characters and have written a JavaScript function to notify the user of the remaining number of characters. This limit matches the limit set in MyS...

Show Detail

Replace all quotes in a string with escaped quotes?

Given a string in python, such as: s = 'This sentence has some "quotes" in it\n' I want to create a new copy of that string with any quotes escaped (for further use in Javascript). So, for example,

Show Detail