Single to double quotes
I'm looking for a GREP (or maybe a script) which can change the single quotes to double quotes, but taking into account that French (and Dutch) have a lot of single quotes that don't have to be converted (collega's; l'enfant;d'été...). The idea is that some people use the single quotes in stead of the double ones ('lorem ipsum daedalus inter e d'été', etc). the quote before lorem has to be changed, not the ' after the letter d, and the ' after été has to be changed too.
Any suggestions?
This seems to work:
'(?![\l\u])|(?<![\l\u])'
For my test, I turned all found items to red.
Similar Messages
-
We are using MS Outlook 2010 as our mail client. But we have noticed that whenevr we sent a mail to any other internet mail recipient all the "apostrophe", "single" and "double quotes" have automatically converted to ?. We have
done almost all the workaround found in this site such as
1.New a message and focus on the message window > click File > Options > Mail > Spelling and Autocorrect… > Proofing > AutoCorrect Options… > AutoFormat > clear the box before “Straight quotes” with “smart quotes”
2. Used different encoding. We presently using US-ASCII for outgoing message. etc.
Need your help to sort out these issues urgently.
Waiting for a solution.Hi,
What is your account type? IMAP, POP or Exchange?
Send an email from the webmail, ask the recipient if this issue persists.
As far as I know, this problem is always related to the encoding for outgoing messages, and here I suggest you try UTF-8:
Go to File -> Options -> Advanced -> International options -> Uncheck "Automatically select encoding for outgoing messages", then select "Unicode (UTF-8)" beside "Preferred encoding for outgoing messages" -> OK.
Hope this helps.
Regards,
Melon Chen
TechNet Community Support -
Single and double quotes entered in form field cause corruption?
I am creating a database change request system using in APEX 2.2 and the main form has a description field (clob) and a API_description field (varchar2(4000)) that are text area fields on the page. The form seems to have trouble when the string data entered into the text area page items on the form contain single and double quotes.
<br><br>
I have pasted my test data below in this problem description(this is not true sql but it gets the point accross). I use the wizard created insert process to get the data into the db from the text fields in the wizard generated form, then use the wizard created fetch process to get the data back out and rendered on the same form. When I use the test data below, sometimes a few characters dissappear from my input data on the way out, sometime form fields go away, and their html is interspersed with the previous form field's data on the page. And I get different results on different tests with the same data.
<br><br>
Do I have to do something special for a vanilla htmldb text page item on a form to be able to receive single and double quotes in the string input in order to avoid that string data confusing the processing on the way in to the Database or on the way out for rendering?
<br><br>
Do I have to escape the characters? How do I do this?
<br><br>
The "varchar2(1) := ‘A’" part of the below TEST DATA string seem to cause the most trouble. The behavior is erratic - sometimes the pattern works, sometimes html is interspersed in one place, sometimes another (on the way back out)
<br><br>
START TEST DATA:
Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
Or
Create a file with following sql in it
Insert into sometable values(‘A’,sysdate);
Or
create new table as follows
create table “someschema”.“sometable”
(id number not null,
Name varchar2(20) not null,
Join_date sysdate
Active varchar2(1) := ‘A’
END TEST DATA:
<br><br>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Here is an example of the test data being displayed after being fetched back out of oracle (this will look like gibberish when rendered in the forum system (end of problem description except for example):
<br><br>
env
Add column pcl3_data_ind varchar2(1) to edc_tran,edc_log, edc_recreate_tran table
Or
Create a file with following sql in it
Insert into sometable values(‘A’,sysdate);
Or
crete new tableas follws
crate table “somesca”.“sometable”
har2(20) not null,
Join_date sysdate
Active varchar2(1) := ‘A’
woextarea>
<a class="eLink" title="Edit" href="javascript:popupURL('f?p=4000:371:204538675714370::::P371_ID,FB_FLOW_ID,FB_FLOW_PAGE_ID:1034609472735510,104,2');" tabindex="999"><img src="/i/e.gif" alt="Edit" class="eLink" /></a></td></tr><tr><td nowrap align="right"><label ...I found a good php related post that has a nice set of the potentially problematic characters (this is in the context of word pasted into IE I think). I am pretty confident that at least single curly quotes do not work well in apex 2.2). I would not be surprised if some of the others were trouble as well.:
http://lists.evolt.org/archive/Week-of-Mon-20030602/141975.html
here is the list
$trans_tbl[chr(34)] = '"' ; // quote
$trans_tbl[chr(38)] = '&' ; // ampersand
$trans_tbl[chr(60)] = '<' ; // less-than
$trans_tbl[chr(62)] = '>' ; // more-than
$trans_tbl[chr(128)] = '€' ; // euro
$trans_tbl[chr(129)] = '€' ; // euro
$trans_tbl[chr(130)] = '‚' ; // low quote
$trans_tbl[chr(131)] = 'ƒ' ; // florin
$trans_tbl[chr(132)] = '„' ; // double low quote
$trans_tbl[chr(133)] = '…' ; // ellipsis
$trans_tbl[chr(134)] = '†' ; // dagger
$trans_tbl[chr(135)] = '‡' ; // double dagger
$trans_tbl[chr(136)] = 'ˆ' ; // circumflex
$trans_tbl[chr(137)] = '‰' ; // per thousand
$trans_tbl[chr(138)] = 'Š' ; // S caron
$trans_tbl[chr(139)] = '‹' ; // left angle quote
$trans_tbl[chr(140)] = 'Œ' ; // OE ligature
$trans_tbl[chr(142)] = 'Ž' ; // Z caron
$trans_tbl[chr(145)] = '‘' ; // left single quote
$trans_tbl[chr(146)] = '’' ; // right single quote
$trans_tbl[chr(147)] = '“' ; // left double quote
$trans_tbl[chr(148)] = '”' ; // right double quote
$trans_tbl[chr(149)] = '•' ; // bullet
$trans_tbl[chr(150)] = '–' ; // en dash
$trans_tbl[chr(151)] = '—' ; // em dash
$trans_tbl[chr(152)] = '˜' ; // small tilde
$trans_tbl[chr(153)] = '™' ; // trademark
$trans_tbl[chr(154)] = 'š' ; // small s caron
$trans_tbl[chr(155)] = '›' ; // right angle quote
$trans_tbl[chr(156)] = 'œ' ; // oe ligature
$trans_tbl[chr(158)] = 'ž' ; // small z caron
$trans_tbl[chr(159)] = 'Ÿ' ; // Y with diaeresis
<br>
-Geoffrey -
MySQL will only let me use backticks (not single or double quotes)
What the hell is going on here? This worked fine until a recent update.
SELECT * FROM "table";
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"table"' at line 1
SELECT * FROM 'table';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''table'' at line 1
SELECT * FROM `table`;
(table prints normally here)
12 rows in set (0.00 sec)
The error happens both in the mysql client, phpmyadmin, and all my php scripts. How do I make it accept single and double quotes?
Phpmyadmin has this to say about the mySQL installation
Server: Localhost via UNIX socket
Server version: 5.1.50
Protocol version: 10
User: root@localhost
MySQL charset: UTF-8 Unicode (utf8)
Last edited by Krause (2010-10-16 10:18:16)Hello
In the SQL Standard, table and column names don't have to be between quotes, only values can be (for instance if you have spaces in a value).
Just call "SELECT * FROM table;", that's all. -
URGENT!! CELLWRAPPER single and double quot issues???
REP-50003: Bad parameter: CELLWRAPPER='I get this error whenever I try and use single or double quotes as a cellwrapper.
However if I do [SPACE][SPACE] as a cell wrapper this works fine?Is this a bug? I'm sure we have version "10.1.2.0.2"?It does appear to be a bug. Look here on Metalink for details.
-
Can't import csv fields starting with double quotes but lack ending ones
Hi all,
When I'm trying to used external table to import a csv file, specified as using comma as delimiter optionally enclosed by double quotes, some records are rejected because a field in the record has starting double quotes, but without ending ones.
Assume the customer really want these starting double quotes, how do I change my external table specification such that these starting double quotes are treated as part of the field data and can be successfully inserted into db?
Many thanks.I have no access to Oracle during weekends, so nothing can be tested. So here it goes:
Suggestion: DELIMITED BY '","' and of course omitt ENCLOSED BY '"'
You will have to update each row of the rows just loaded setting the first_field to substr(first_field,2) and the last_field to substr(last_field,-2)
If all the fields are not enclosed in double quotes (TRUE for strings and FALSE for numbers and dates) the situation (syntax diagrams allow two delimiters only) is somehow more complicated, anyway you can specify DELIMITED BY ',' and update all varchar2 fields in each row of the rows just loaded setting the varchar2_field to substr(varchar2_field,2,length(varchar2_field) - 2).
Regards
Etbin
After posting I noticed it's difficult to distinguish between single and double quotes:
the first DELIMITED BY should read {single quote){double quote}{comma}{double quote}{single quote)
the ENCLOSED BY should read {single quote){double quote}{single quote)
Message was edited by: Etbin
user596003 -
SSRS Report Returning Double Quote string from a Single Quote String
Hi, I'm getting weird thing in resultset from SSRS report when executed. When I pass parameter to a report, which passes String that has single quote value to a split function , it returns rows with double quote.
For example following string:
'N gage, Wash 'n Curl,Murray's, Don't-B-Bald
Returns:
''N gage, Wash ''n Curl,Murray''s, Don''t-B-Bald
through SSRS report.
Here is the split function Im using in a report.
CREATE Function [dbo].[fnSplit] (
@List varchar(8000),
@Delimiter char(1)
Returns @Temp1 Table (
ItemId int Identity(1, 1) NOT NULL PRIMARY KEY ,
Item varchar(8000) NULL
As
Begin
Declare @item varchar(4000),
@iPos int
Set @Delimiter = ISNULL(@Delimiter, ';' )
Set @List = RTrim(LTrim(@List))
-- check for final delimiter
If Right( @List, 1 ) <> @Delimiter -- append final delimiter
Select @List = @List + @Delimiter -- get position of first element
Select @iPos = Charindex( @Delimiter, @List, 1 )
While @iPos > 0
Begin
-- get item
Select @item = LTrim( RTrim( Substring( @List, 1, @iPos -1 ) ) )
If @@ERROR <> 0 Break -- remove item form list
Select @List = Substring( @List, @iPos + 1, Len(@List) - @iPos + 1 )
If @@ERROR <> 0 Break -- insert item
Insert @Temp1 Values( @item ) If @@ERROR <> 0 Break
-- get position pf next item
Select @iPos = Charindex( @Delimiter, @List, 1 )
If @@ERROR <> 0 Break
End
Return
End
FYI: I'm getting @List value from a table and passing it as a string to split function.
Any help would be appreciated!
ZKAnother user from TSQL forum posted this code which is returning the same resultset but when I execute both codes in SQL server it works and return single quote as expected.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8d5c96f5-c498-4f43-b2fb-284b0e83b205/passing-string-which-has-single-quote-rowvalue-to-a-function-returns-double-quoate?forum=transactsql
CREATE FUNCTION dbo.splitter(@string VARCHAR(MAX), @delim CHAR(1))
RETURNS @result TABLE (id INT IDENTITY, value VARCHAR(MAX))
AS
BEGIN
WHILE CHARINDEX(@delim,@string) > 0
BEGIN
INSERT INTO @result (value) VALUES (LEFT(@string,CHARINDEX(@delim,@string)-1))
SET @string = RIGHT(@string,LEN(@string)-CHARINDEX(@delim,@string))
END
INSERT INTO @result (value) VALUES (@string)
RETURN
END
GO
ZK -
Closed Quotes, single and double, are unavailable
Does anyone have any recent issues with InDesign document not automatically inserting either a closed single or closed double quote? I have not experienced this before, and I've checked pref>type with no current doc open, I've checked multiple font just in case they could be the quirky issue, I've checked my shortcuts page under the Products:Type area, and no shortcuts are selected... Help?? Suggestions?
Have you checked Preferences > Type WITH the current document open? If so, you might need to reset preferences.
-
How to replace double quotes with a single quote in a string ?
Hi All:
Can some one tell me how to replace double Quote (") in a string with a single quote (') ? I tried to use REPLACE function, but I couldn;t get it worked.
My example is SELECT REPLACE('STN. "A"', '"', ''') FROM Dual --This one throws an error
Thanks,
Dima.Whether it is maybe not the more comfortable way, I like the quoting capabitlity from 10g :
SQL> SELECT REPLACE('STN. "A"', '"', q'(')') FROM Dual;
REPLACE(
STN. 'A'{code}
Nicoals. -
How to replace single quote with double quote
hai all,
i have a problem,
i am trying insert a string containing single quote into ms-access database.
it is giving error.
how can i avoid this .if i replace a single quote in the text with double quote it will defenitely
insert into database.
in java.lang.String
replace () will not work to replace quote with double quote.
any otherway to solve this problem.
please mail me to [email protected]
thank you
sambareddy
inidajava.lang.String.replace () will not work to replace quote with double quote.Really?
String x = ...
x.replace( "'", "\"" ); -
Replace Single Quote with double quote
Hi All,
I have a String s="help'me'to'replace";
i want to replace single quote( ' ) in to double quote ( " )
The final out put should be like this help"me"to"replace
( Actually this string i have to pass in to an XML )
Please help any ones.replaceAll("'","\"");{code}
or just one of the String#replace() methods.
Edited by: sabre150 on Mar 17, 2009 11:48 AM -
Replacing " (double quote) with ' (single quote)
Hi there,
I have the following method to manipulate user input. All I want to do is, to replace the double quote with a single quote. The implementation I tried was,
this.replace(desc, "\"", "'");
This does not work for me. It jsut removes the double quote and does not introduces the single quote. Could any one please advise?
Thanks,
Des
public static String replace(String line, String oldString, String newString) {
if(line != null && oldString != null && newString != null) {
int index = 0;
while ((index = line.indexOf(oldString, index)) >= 0) {
line = line.substring(0, index) +
newString +
line.substring(index + oldString.length());
index += newString.length();
return line;
}Bad luck.. I am unable to get it still.
This is the code I am using (implemetation is in a JSP. I am using this code to test it).
public class Test{
public static void main(String args[]){
String s = args[0];
Test t = new Test();
String doubleQuote = "\"";
System.out.println(" output :"+ t.replace(s,doubleQuote,"'"));
//System.out.println(" output :"+ t.replace(s,"\"","'"));
//System.out.println(" output :"+ t.replace('"', '\''));
public static String replace(String line, String oldString, String newString) {
if(line != null && oldString != null && newString != null) {
int index = 0;
while ((index = line.indexOf(oldString, index)) >= 0) {
System.out.println(" line count :");
line = line.substring(0, index) +
newString +
line.substring(index + oldString.length());
index += newString.length();
return line;
}mshn02
The main problem is I am stuck with the server's version of Java (which I have no control on it). I could not use 1.4.2 -
String value changes single quote ' to double quote "
I am creating a list with different bill codes within single
quotes as follows
<cfset corlist = " '1100 ','1200 ','1300 ','1700 ','1800
','1950 ','7001 ' ">
when I do an output
for
<cfoutput>AND idbillcode IN ( #corlist
#)</cfoutput>
I get the values as follows
AND idbillcode IN ( '1100 ','1200 ','1300 ','1700 ','1800
','1950 ','7001 ')
However when I put the same string within a cfquery the
single quotes get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
'',''1800 '',''1950 '',''7001 '') which throws an error.
Anybody has any clues.
Thanks.However when I put the same string within a cfquery the
single quotes
get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700
'',''1800
'',''1950
'',''7001 '') which throws an error.
Anybody has any clues.
That is ColdFusion escaping the single quotes, by doubling
them so that
you can search for strings such as "singhpk's code does not
work".
(Note the single quote/apostrophe that would normally break
this string
if it was not escaped.
To tell CF not to do this, one uses the
preserveSingleQuotes() function.
The documentation has all the details. -
Change XML declaration from single quote to double quote
Hi all,
i have the following problem in my File Receiver Adapter. My XML File has the declaration <?xml version='1.0' encoding='utf-8'?> (With single quotes ') and want to change it to <?xml version="1.0" encoding="utf-8" ?> (With double quotes ")
I use the XMLAnonymizerBean but this does not change the XML declaration.
Any ideas how to change the declaration
Thanks MaxHi Suraj,
on the Modul Tab i have the following:
1 | AF_Modules/XMLAnonymizerBean | Local Enterprise Bean | Anonymizer
2 | CallSapAdapter | Local Enterprise Bean | 0
Anonymizer | anonymizer.acceptNamespaces | http://Post.AG/PartnerInterface/Schemas/PVSdeAt/Aviso_V1.0 ns0 http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoHeader ns1 http://PostAG.PartnerInterface.Schemas.PVS_deAt.AvisoShipper ns2
Anonymizer | anonymizer.quote | "
That is all what i have on the module tab.
I send the data as Text (not Binär). Thats all what i have in the adapter. Do you need any further information?
Regards, Max -
Need Double quotes instead of Single quotes in output XML version header
In XML output generated by XDODTEXE executable, its observed that header row looks like this:
<?xml version = '1.0' encoding = 'UTF-8'?>
It should look like this:
<?xml version="1.0" encoding="UTF-8"?>
Browsers like IE deceive. Opening the XML in Text editors show single quotes and spaces.
Data Template and XSL template files have proper headers with double quotes.
The output XML file is rejected by a Government Authority as parsing the header line fails.
Are there any ways to configure this?I dont know if this has anything to do with my problem or not, but I thought I should add this:
When a user is filling out the form that has the textarea, they put whatever text they want into the textarea field.
textarea name="text"></textarea
Then, they click on a 'Continue' button and the system shows them a preview of what they are about to have inserted
into the database.
Within the code on this preview page is a hidden field, which holds the contents of their textarea data so it can be
passed on through the process once the user verifies the preview.
This is done using this: input type="hidden" name="text" value="<cfoutput>#text#</cfoutput>"
Like I said, I don't know if that has anything to do with this problem, but thought it might be good to mention it
Kudos
Maybe you are looking for
-
Xserve deliver filling up system.log
Just checked my system.log after a hard crash and it seems to be constantly filling up with the following: Dec 18 15:33:23 xserve deliver[24559]: connect(/var/imap/socket/lmtp) failed: No such file or directory Dec 18 15:33:23 xserve deliver[24560]:
-
Problems with the sound in the headphones when you press the keys iphone 5s
Sound distortion " keyboard clicks " headphones.
-
How do I resolve the Apple ID security questions for which I have forgotten the answers to access my iTune store account? Please assist.
-
Hi when ever i try and view a page which uses my bean, i get this error message: Internal Servlet Error: javax.servlet.ServletException: loginBean at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399) at javax.servlet.http.Ht
-
Why have I lost Adobe Acrobat when it has been on my PC for four years?