Questions related to the use of single-quotes in different programming languages.
Questions tagged [single-quotes]
352 questions
-1
votes
1 answer
Using CSS to force showing right single quotation mark instead of apostrophe
For some reasons I want that my static blog shows right single quotation mark (’) where there is an apostrophe ('). Is it possible to force it using CSS?

Mehdi Abbassi
- 627
- 1
- 7
- 24
-1
votes
1 answer
Why does `python -c 'print('howdy')'` produce an error (in zsh), but `python -c 'print("howdy")'` does not?
When, in zsh, I execute python -c 'print('howdy')' from the command line, it produces the following error.
Traceback (most recent call last):
File "", line 1, in
NameError: name 'howdy' is not defined
However, this python -c…

TransferOrbit
- 201
- 2
- 7
-1
votes
1 answer
Azure ADF build query using concat in lookup activity
I have below SQL server query which builds a string like this: 'Group1', 'Group2', 'Group3'
SELECT '''' + '
STRING_AGG(CAST(groupname as NVARCHAR(MAX)), ''',''') + ''''
FROM groups
WHERE category = 'food'
I have a lookup expression in a ADF…

user7432713
- 197
- 3
- 17
-1
votes
1 answer
Swift Json Single Quote Parse
I have a problem while parsing json which includes single quote. I am using JSONDecoder. I added response from API at below and I don't want to do any replacement or some regex operations. Are there any workaround for that?
"{\'value1\': true,…

Cagdas
- 101
- 2
- 9
-1
votes
1 answer
Python, detect a character with on quote inside a string between double quotes
I have the example bellow of a tuple:
('XXXX','XXXX',"XXXX's Something",'XXXX')
I want to turn it into:
('XXXX','XXXX','XXXX''s Something','XXXX')
The reason why i'm trying to do it, is that this input will be ingested in Azure SQL database which…

El Mehdi OUAFIQ
- 152
- 1
- 13
-1
votes
1 answer
Linux command and single quote
I thought the single quotes simply reserve the literal value of each character within the quotes and do not interfere with the command result except for those character-escaping situations.
For example, the two commands below returned the same…

Seaport
- 153
- 2
- 14
-1
votes
1 answer
Single Quotes inside Single Quotes removing Forward Slashes
I have this code:
$profile_image_url = str_replace(" ", "%20", 'https://www.example.com/images/cropped (1).jpg');
$output .= "style='background:url('https://www.example.com/images/" . $profile_image_url . "')no-repeat;'";
The output results…

cpcdev
- 1,130
- 3
- 18
- 45
-1
votes
2 answers
quoting problem when use perl -e command in shell
With double quotes
The following command
$ cat ./multi_meta | jq .Partitions[].DocCount | perl -lne "$x += $_; END{ print $x;}"
gives me a syntax error:
syntax error at -e line 1, near "+="
Execution of -e aborted due to compilation errors.
With…

infantcoder
- 1
- 3
-1
votes
4 answers
How to remove single quote from array of objects in javascript
I want to remove single quotes from the array of objects in javascript.
var arr = ['{"email":"abc@gmail.com","name":"Abc"}',
'{"email":"def@hotmail.com","name":"Dr.Def"}',
'{"email":"xyz@gmail.com","name":"Xyz"}',
…

Khyati Sharma
- 109
- 1
- 9
-1
votes
1 answer
My python code works in one VM and not in the other ... complaining about quotes
I have 2 VM sessions.
In the VM session A, the script won't run right if I type python
if I don't put python3 the error I get
but if I type python3 it's fine.
When I move this script to my other VM session B, and I try to run it, it is spitting…

Paul Z
- 53
- 6
-1
votes
1 answer
How to store a single quote in sql variable
Declare @qt varchar(5)
Declare @xmlt xml
set @qt = '''
I am unable to store a single quote in a variable, I need to concatenate before and after a column like below
update #TEMP_TABLE2
set XMLDatat =CONCAT(@qt,@xmlt,@qt)
So i have a single quote…

Kumar
- 11
- 7
-1
votes
1 answer
Missing right quote in callableStatement.getString result
I am calling an Oracle stored procedure from spring boot application. The SP will return either Y or N (status). It is working perfectly in SQL Navigator. But when i call it from Java I am getting the status as "Y (i.e. with an opening quote and…

Thiagarajan Ramanathan
- 1,035
- 5
- 24
- 32
-1
votes
1 answer
Change double quotes to single quotes and order of key values pairs in json
I have json output and I would like to convert it into below format. I'm using ast.literaleval, I would like to have desired sorted by id and name in single quotes. I used ordered dict for desired order but not sure how to convert double quotes to…

Kay
- 7
- 1
- 7
-1
votes
1 answer
Single-quoted body in API request
I am making an iOS app that makes requests to an API. The request is in this format:
curl -X PUT -H "Content-Type: application/json" -d '{"username":"blabla@hotmail.com","password":"blabla"}' "https://server.mywebsite.com/login"
The API can only…

P. Stylianou
- 55
- 1
- 7
-1
votes
4 answers
Mysql INSERT query of variables in PHP
I have spent two days trying to figure out why this statement wouldn't insert those data into my database. Been reading through all similar questions here as well and tried with no luck. This is the statement:
$sql = "INSERT INTO…

Hang
- 355
- 3
- 19