Questions tagged [apostrophe]

The single-quote character (')

499 questions
10
votes
4 answers

How to get Excel to ignore apostrophe in beginning of cell

I'm writing a tool that syncs a simple database with Excel sheets. Each item in a table in the database corresponds to one row in the worksheet. I read the Excel sheet into the tool using C# and the Excel interop com interface, then compared the…
Srekel
  • 2,183
  • 3
  • 21
  • 26
9
votes
3 answers

Escape apostrophe when passing parameter in onclick event

I'm passing the company name to an onclick event. Some company names have apostrophes in them. I added '.Replace("'", "'")' to the company_name field. This allows the onclick event to fire, but the confirm message displays as "Jane&# 39;s Welding…
RememberME
  • 2,092
  • 4
  • 37
  • 62
8
votes
2 answers

Python XPath parsing tag with apostrophe

I'm new to XPath. I'm trying to parse a page using XPath. I need to get information from tag, but escaped apostrophe in title screws up everything. For parsing i use Grab. tag from source: commission:Alfred\
8
votes
2 answers

DataTable select method with single quote conflict C#

I recently found when I do a LINQ select under a field that contains an apostrophe, it makes my application to throw an exception. DataRow[] newDr = this.ds.Tables["TableName"].Select("Name = '" + drData["Name"].ToString() + "'"); If drData["Name"]…
Maximus Decimus
  • 4,901
  • 22
  • 67
  • 95
8
votes
1 answer

Change UIKeyboardType based on text input

I'm trying to change the UIKeyboardType to the alphabet keyboard when the user types a space, mirroring the effect of typing an apostrophe. However, my code won't change the keyboard appearance until the user dismisses the keyboard and then brings…
MaxGabriel
  • 7,617
  • 4
  • 35
  • 82
7
votes
3 answers

how to encode apostrophes for a webpage

i am using the cluetip plugin and the simple use case is to to put the content in a title attribute, like below: Text i am now running into issues where the string that is inside "detail content' has an…
leora
  • 188,729
  • 360
  • 878
  • 1,366
6
votes
8 answers

OLEDB, Writing Excel cell without leading apostrophe

I'm writing to Excel file using OLEDB (C#). What I need is just RAW data format. I've noticed all cells (headers and values) are prefixed by apostrophe (') Is it a way to avoid adding them in all text cells? Here is my connection string: string…
Maciej
  • 10,423
  • 17
  • 64
  • 97
6
votes
2 answers

What is the correct way to support apostrophes in javascript when building up html?

i have the following code: var name = "Joe O'Neal"; var row= []; row.push( " " + name +…
leora
  • 188,729
  • 360
  • 878
  • 1,366
6
votes
2 answers

apostrophes are breaking my mysql query in PHP

My database has name records that occasionally contain apostrophes, such as Joe's Bar and I've just coded a query script in PHP that grabs that field and sticks it into a select statement with the usual $query = "SELECT address FROM restaurants…
Drew
  • 6,208
  • 10
  • 45
  • 68
6
votes
3 answers

JSON value with apostrophe

I have an element with a rel attribute that contains a JSON string, something like: rel='{"id":"#id#","name":"#name#"}' Then, in my javascript code, I use $.parseJSON to parse this data. This works correctly - besides for cases where name contains…
froadie
  • 79,995
  • 75
  • 166
  • 235
6
votes
5 answers

Replace " ’ " with " ' " in PHP

I'm grabbing a string from the database that could be something like String’s Title however I need to replace the ’ with a ' so that I can pass the string to an external API. I've used just about every variation of escaped strings in str_replace()…
Mike R
  • 951
  • 1
  • 8
  • 13
5
votes
1 answer

Are apostrophes valid containers for HTML element attribute values?

Usually HTML element attribute values are marked with a quotation mark, like Sometimes, however, you see code like Is it valid HTML and can it cause any problems? What…
simon
  • 12,666
  • 26
  • 78
  • 113
5
votes
2 answers

Detecting an Apostrophe in a NSString?

I'm using Gamekit to send data via bluetooth between two devices. I want to get the name of the device that sent it, but if the name is "Bob's iPhone" I want to cut off the "'s iPhone". I first check for ending in "iPhone" or "iPod Touch". if…
5
votes
2 answers

Usage of single quotes in SQL queries

I have the following SQL query: SELECT id_zam AS test, CASE WHEN (SELECT something FROM sth WHERE id_something = test) = 1 THEN 'true' ELSE 'false' END as test_result FROM…
XardasLord
  • 1,764
  • 2
  • 20
  • 45
5
votes
1 answer

apostrophe text comparison in xsl

I have a problem with text with apostrophe symbol example i try to test this xml having the symbol is then how can i compare ? this is statement showing error Regards Nanda.A
Nanda
  • 221
  • 1
  • 4
  • 9
1
2
3
33 34