apostrophe

Apostrophes replacing quotation marks in script tag in input field.

I have this input in a form: <input type="text" value="<script src='/js/script.js' type='text/javascript'></script>" name="embed"/> The quotations in general have to be double, so I put single-quotes within the value property. However, when I do that, the result is: <script src=’/js/script.js’ type=’text/javascript’></script> Not...

Apostrophes and SQL Server FT search

I have setup FT search in SQL Server 2005 but I cant seem to find a way to match "Lias" keyword to a record with "Lia's". What I basically want is to allow people to search without the apostrophe. I have been on and off this problem for quite some time now so any help will really be a blessing. ...

SAS function to strip apostrophes from a character string (compress?)

I have a string which looks like this: "ABAR_VAL", "ACQ_EXPTAX_Y", "ACQ_EXP_TAX", "ADJ_MATHRES2" and I'd like it to look like this: ABAR_VAL ACQ_EXPTAX_Y ACQ_EXP_TAX ADJ_MATHRES2 ie no apostrophes or commas and single space seperated. What is the cleanest / shortest way to do so in SAS 9.1.3 ? preferably something along the lin...

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 connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filePath + ";Exten...

How to search for matches with optional special characters in SQL?

I have a problem with a search query I am using my data contains names and information that has apostrophes in various forms (HTML encoded and actual). So for example I would like an alternative to this: SELECT * FROM Customers WHERE REPLACE(LastName,'''','') LIKE Replace('O''Brien,'''','') This is just an example, what I want is a...

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 into the tool using C# and the Excel interop com interface, and compare the items' values (i.e. one of the columns in the excel sheet) after the sync just to make sure that they...

correct comment code for apostrophe s situation

Just curious how you would comment this line of code: string customerNm = customerNm.EndsWith("s") ? customerNm+= "'" : customerNm+="'s"; ...

PHP: POST data + apostrophes

Imagine this: Form data contains an apostrophe Form gets submitted POST data gets serialized POST data is written to database Database data is retrieved Data cannot be unserialized The problem is found in the serialized data. I tried without and with an apostrophe: s:7:"company";s:12:"Joes company" s:7:"company"...

Add apostrophe to last name search

I created a proc that will return a list of applicants by lastname. I have a problem searching Applicants with last name that has apostrophe (Example O'Connor). Could you please help finding those applicants: Below is my Search Code: if Rtrim(@FirstName) <> '' begin If(Len(@FirstName) < 30) and (CharIndex('%', @FirstName) = 0) and @...

Issue With Apostrophe

I have a Proc that was coded in Dynamic SQl for one of my Application. It is using to search the Applicants with their last name. Right now it is searching applicants with either their first 2 digits of their last name or full last name. But i have a problem searching Applicants that have Apostrophe in their last name(Example O'Connor). ...

PHP - Calling Relative URL within = 'xx' apostrophe's

I'm trying to insert a relative URL in the code below before "/images" in $thumb_directory and $orig_directory however I'm not sure how to do so within 'apostrophe's'. Also, this is a WordPress website, so if anyone knows how to call the function within '/images', like so: '/images' please let me know (I realize that what I just typed ...

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 WHERE name='$name'"; and the apostrophe in some of the restaurant names derails the Love Train...

Informix apostrophe SQL error

I get [Informix][Informix ODBC Driver][Informix]A syntax error has occurred when running the query below. When I remove the double apostrophes the query executes successfully. Everything I can find by Googling tells me I'm doing the right thing. Seven years ago I used Informix without this sort of problem so I think I've forgotten someth...

apostrophe text comparison in xsl

Hi 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 ? <xsl:for each select="country[nation='India's]"> this is statement showing error Regards Nanda.A ...

apostrophe in mysql/php

i'm trying to learn php/mysql. inserting data into mysql works fine but inserting those with apostrophe is generating an error. i tried using mysql_real_escape_string, yet this doesn't work. would appreciate any help. <?php include 'config.php'; echo "Connected <br />"; $auth = $_POST['author']; $quo = $_POST['quote']; $author...

Storing apostrophes, exclamation marks, etc. in mysql database

I changed from latin1 to utf8. Although all sorts of text was displaying fine I noticed non-english characters were stored in the database as weird symbols. I spent a day trying to fix that and finally now non-english characters display as non-english characters in the database and display the same on the browser. However I noticed that ...

Sanitizing DB inputs with XSLT

Hello I've been looking for a method to strip my XML content of apostrophes (') since my DBMS is complaining of receiving those. I need <name> Jim O'Connor</name> to become: <name> Jim O''Connor</name> By looking at the example described here, that is supposed to replace ' with '', I constructed the following script: <xsl:s...

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 Company". <a href="#" onclick="return Actionclick('<%= Url.Action("Activate", new {id ...

Handling apostrophes, php and pgsql

For my forms, I'm using pg_escape_string on every field before I insert them into the database. So I get something like firstname='O''reilly'. But when I try to print that out, I get O''reily, 2 apostrophes. Shouldn't it only 1 apostrophe, O'reilly? This isnt a debugging problem, im just wondering if you have firstname='O''reilly', how ...

A very odd Apostrophes MySQL PHP error

Hi Guys, another brain teaser. This isn't the usual "but Apostrophes are breaking my Queries" as I know all about escaping and sanitising so I'll get right too it. Many many things are stored in a db with names like "Assassin's" and "Babe's" which end up "Assassin\'s" and "Babe\'s", recovering is good but searching via text is... painf...