Double up quotes (apostrophe)

Hello
I have a variable which contains a french string with a quote: L'experience....
This string could come from XML-File, text file or error messages.
How is it possible to double up the single quote to insert this string into a database?
A simple insert fails because the database does not accept this:
INSERT INTO xxx VALUES(#variable_name)
I found a technical document for ODI: ID 867906.1 but this document does not explain how to double up.
Any hints are appreciated.
Regards
Markus

Your error says that this method wasnt found in java.lang.string.
Do you know what version of Jython you have ? This could be a version issue !
Mine is Jython 2.1 and Java 1.6 and I tried similar commands on Windows Command Prompt
$ODI_HOME\oracledi\bin>jython
OracleDI: Starting Jython ...
A JDK is required to execute Web Services with OracleDI. You are currently using a JRE.
Jython 2.1 on java1.6.0_07 (JIT: null)
Type "copyright", "credits" or "license" for more information.
$ import java.lang
$ v_var="abc'something"
$ v_var1=v_var.replace("'","''")
$ print v_var1
abc''something
$ print v_var
abc'something
$ v_var1=v_var.replace("'","''",2)
$ print v_var1
abc''something
$ v_var1=v_var.replace("'","''",0)
$ print v_var1
abc'somethingTry using v_var.replace("'","''",1) - This is an overloaded method that uses third parameter as number of occurrences that you want to replace.
Also, try using import java.lang instead of import lang

Similar Messages

  • FM8 Quotes/apostrophes revisited

    I cannot use the '/" key with Smart Quotes on. I'm running FM 8.03 as part of the Tech Comm Suite under XP SP2. My maker.ini file reads <br /><br />; English curved quotes:<br />SmartQuotes=\xd4\xd5\xd2\xd3<br /><br />The version in Docs & Settings has no such section. <br /><br />Turning Smart Quotes off provides a partial resolution, as the "/' key works and I can use keyboard "shortcuts" to input the smart versions. <br /><br />These are the related cmds.cfg settings:<br /><br /><Command CharLeftDblQuote<br />     <Label Left Double Quote><br />     <Definition \xd2>><br /><br /><Command CharRightDblQuote<br />     <Label Right Double Quote><br />     <Definition \xd3>><br /><br /><Command SmartSingleQuote<br />     <ReservedLabel Long Smart Single Quote><br />     <ReservedLabel Undo Typing><br />     <KeySequence    '><br />     <Definition \x400>><br />     <br /><Command SmartDoubleQuote<br />     <Label Smart Double Quote><br />     <KeySequence    "><br />     <Definition \x401>><br /><br />What would happen if I deleted the .cache file?

    What's worse: I just did a global find and replace, trying to fix four dumb quotes in an entire document that I'd cut and pasted--and Pages turned every single smart quote into a dumb quote. In all 92 pages. 1,600 smart quotes dumbified. With no way for me to smarten them up again.
    Then, because I'm just as dumb as my quotes, I did the same thing with my single quotes/apostrophes.
    I know how I'll be spending my afternoon.

  • Replacing quotes/apostrophes with smart quotes/apostrophes

    In previous versions of Pages, when pasted content included stardard quotes or apostrophes you could do a quick replace with smart quotes/apostrophes simply by doing a find and replace. Not so with the new Pages 5.
    Anyone figured out how to force Pages to do such a replace? Manually trying to do it on a long document is crazy.

    What's worse: I just did a global find and replace, trying to fix four dumb quotes in an entire document that I'd cut and pasted--and Pages turned every single smart quote into a dumb quote. In all 92 pages. 1,600 smart quotes dumbified. With no way for me to smarten them up again.
    Then, because I'm just as dumb as my quotes, I did the same thing with my single quotes/apostrophes.
    I know how I'll be spending my afternoon.

  • Certain keys don't work-delete, space bar, caps lock, quotes-apostrophe key

    Certain keys don't work on the built-in keyboard: delete, space bar, caps lock, quotes-apostrophe key...I have to use the "keyboard viewer" to use these particular keys. My adapter is connected to the computer, but the problem persists.
    Can anyone please suggest troubleshooting for this annoying problem? It has been like this for about 2 weeks now.
    Thanks in advance for any suggestions!

    Does anything happen when you hit these keys?
    Try this:
    In System Preferences>Keyboard & Mouse, click the "Keyboard Shortcuts" tab, then the "restore defaults" button.
    ~Lyssa

  • Double space after apostrophe in iMessage

    Ever since I updated to Mavericks, iMessage on my MacBook Pro (mid 2012) adds a double space after I use an apostrophe! It also doesn't save my background color preference (but it does save font color, font, and other user's font and color). It only shows up for me, not for the person I send the message to.
    It looks like this:

    Hi,
    The Original Poster newer came back with any more info on the subject.
    This also left her Balloon (or Background) colour unresolved as well.
    In Messages 8 (Mavericks) the Smiley function now uses the Emoji font to create the Smilies.
    In iChat versions and Messages 7 you could show the Smiley drop down and mousing over the Smilies would reveal the text keystrokes that would be needed to create it if typing them.
    This does not happen with the Emoji Font.
    However most of the icons are created by double character info which may mean a keystroke might just be invoking it.
    Playing with these settings may provide something.
    9:04 pm      Saturday; December 21, 2013
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Cannot encode double & single quote " and ' using htmldb_util.url_encode()

    Hello,
    I'm using HTMLDB 1.5.0.00.33 on Oracle 9.2.0.6 database. The data(a sql query that populates the report page) that I want to pass as part of URL string contains special characters like #, $, % and quotes " or '. I'm using htmldb_util.url_encode() to encode the data and it works fine for special characters except for " & '. Can someone please help in this? Below sql query shows that.
    SQL>select htmldb_util.url_encode('A%"#') from dual;
    HTMLDB_UTIL.URL_ENCODE('A%"#')
    A%25"%23
    1 row selected.
    Thanks
    Shashin

    Shashin,
    You could try using the UTL_URL.Escape function with the escape_reserved_chars parameter set to TRUE. That should encode the reserved characters.
    See the documentation here: http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_url.htm#sthref15935
    If you want to call it from a SQL statement, you'll need to wrap it in a function like this:
    function MyURLEscape(URL varchar2) return varchar2 is
       Result varchar2(4000);
    begin
       Result := UTL_URL.Escape(URL, TRUE);
       return(Result);
    end MyURLEscape;

  • How do I disable smart quotes, apostrophes in Mac Outlook 2011?

    In Mac Outlook 2011, when I type a message that contains an apostrophe or a quotation mark, Outlook corrects it to a "smart" apostrophe or a "smart" quotation mark, and I'd rather it didn't.
    Is there any way to disable this feature? So far, I've unchecked all the autocorrect and autoformat preferences, and I've set my composition settings to plain text and my encoding settings to UTF-8 (two suggestions I saw elsewhere). None of those worked.
    What else should I try?

    I think, you should post here : http://answers.microsoft.com/en-us/mac/forum/macoffice2011?tab=Threads
    Arnav Sharma | http://arnavsharma.net/ Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading
    the thread.

  • 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.

  • Apostrophes (single quote) are lost when generating DDL code.

    Hi,
    ODI Version : 11.1.1.5.0
    Java version : 1.6.0_24
    Database version : Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    Context: Generating DDL code for a an ODI Model
    PROBLEMATIC: When generating DDL code, all apostrophes (single quote: ') are removed from Datastore Descriptions and Datastore Colunms Descriptions in the process of generating Comments on Tables and Comments on Tables Columns. I tried to double, even triple apostrophes (in descriptions), without success. I also tried double quotes (") without success either.
    Ex: Datastore Column Description: *+ID de l'utilisateur+* becomes *+comment on table ... is 'ID de l utilisateur'+* in generated procedure.
    Do you know a way to keep the apostrophes when creating Comments on Columns and Oracle Tables by generating DDL code ?
    Regards,
    Gaston
    Edited by: uleblga on 23-May-2012 3:42 PM
    Edited by: uleblga on 23-May-2012 3:42 PM

    Nobody has a clue as how to handle this problem ?
    Regards,
    Gaston

  • How to globally change straight double quotes to curly open and close?

    I am editing with InDesign (5.5) some documents created by others. I suddenly noticed that the double quote marks were straight, not curly, in one document and Find/Change does not seem to offer and option to distiguish the open (left) double quote mark from the right (close) when starting with double straight quotes. Any suggestions?
    And--unrelated--why is so hard to get to a page where you can actually post a question?
    Thanks!
    Jill

    Since the position of a double quotation mark determines its shape, it is easiest to use GREP with Find/Change. You can (1) find a straight quotation mark at the beginning of a word/phrase and change it to left quotation marks, and then (2) find a straight quotation mark at the end of a word/phrase and change it to right quotation marks.
    (1)
    Find what:
    ~"([\l\u\)[:punct:]])
    This finds a straight quotation mark in front of any character or punctuation.
    Change to:
    \x{201C}$1
    This puts a left quotation marks in front of what was behind the straight quotation mark.
    (2)
    Find what:
    ([\l\u\)[:punct:]])~"
    This finds a straight quotation mark behind any character or punctuation.
    Change to:
    $1\x{201D}
    This puts a left quotation mark behind what was behind the straight quotation mark.
    I would find/change the first hits one at a time, and when you are confident that it works for your documents, go ahead and Change All.

  • 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

  • JS - surrounding selected text with double quotes

    I have a working script which places brackets around selected text in the main body of my document (not in a table), but when I changed the script to insert double curly quotes, the script wont work.
    Why wont this JS work (script stalls on the var line):
    var myObject = (app.selection[0].parent.constructor.name == "Cell") ? app.selection[0].parent.texts[0] : app.selection[0];
    with (myObject)
    insertionPoints[-1].contents = "";
    insertionPoints[0].contents = "";
    while this one does work:
    var myObject = (app.selection[0].parent.constructor.name == "Cell") ? app.selection[0].parent.texts[0] : app.selection[0];
    with (myObject)
    insertionPoints[-1].contents = ")";
    insertionPoints[0].contents = "(";
    Thx Oz
    PS The quotes are showing as three straight quotes above, but in my script they are two straight double quotes surrounding either a right or a left curly double quote.

    Perhaps there's a Smart Quotes interpreter in JS? Who knows.
    If you find it failing again, try inserting the quotes as Unicode values, as these should not be subject to any translating.
    I.e.,
    >insertionPoints[-1].contents = "\u201c";

  • How to replace curved apostrophe with straight apostrophe?

    How do I search/replace for curved apostrophe to straight apostrophe?
    How do I search/replace for curved open and close quotes to straight quotes?
    I have smart quotes turned off (which turns ON curved apostrophe).
    The source material was copied and pasted from email which is why the quotes are straight.
    Thanks.

    David, I can't imagine doing anything inside Word is easier.
    Courtesy of Mike Wickham, these are the characters to use INSIDE search/replace boxes:
    You can use these hex values inside the find dialogue. They can be found in the "FrameMaker Character Sets" PDF, which came with your software or can be found online.
    \x22 = straight quote
    \x27 = straight apostrophe
    \xd4 = curly left single quote
    \xd5 = curly right single quote (apostrophe)
    \xd2 = curly left double quote
    \xd3 = curly right double quote
    Typing in the document itself, Esc+" produces a straight double quote and Ctrl+' produces a straight single quote (apostrophe).
    Courtesy of David Artman:
    Curved apostrophe Find: ALT+0146 (’)
    Curved quotes Find: ALT+0147 (“) or ALT+0148 (”)
    After this issue, I googled for FrameMaker Character Sets and downloaded it. That would be my future recommendation for everyone.
    Thank you all for your help!

  • Curly quotes

    My company is moving away from windows based servers running IIS to Linux running Apache. So now I'm running into the curly quotes issue when pasting from Word in dreamweaver CS4. I have a bunch of sites already built that will be ported over. Not to mention the fact that I get virtually all the content from Word docs. Is there any way to automatically convert  curly quotes, apostrophes, em dashes etc without having to resort to manual find and replace on every page? This has become a major issue for me and I'm wondering if there's any way to set up CS4 to automatically handle these characters when cutting and pasting from Word. DW used to do this but CS4 doesn't seem to. Any info is appreciated.
    thanks

    That is bad programming, they should not occur in these situations.
    Thank you for pointing it out I never noticed, because like 95% of the known universe I use metric measures.
    I have tried all the likely keyboard commands and searched the user manual and can not find a solution.
    I thought of replacing the auto correction with the appropriate space" and "space but this is already hard encoded in and wouldn't fix the problem. What was required in the programming was to check if there was a leading quote mark before substituting a trailing quote mark.
    Send feedback to Apple at http://www.apple.com/feedback/pages.html
    A work around is to go:
    +Menu > Edit > Special Characters… > Punctuation > and use ′ or ″ (single or double Prime)+
    These are actually the correct characters for feet and inches and will not be substituted.
    To speed it up as you type you could use auto-correction to substitute for /' and /" or whatever you think will work.

  • GETPIVOTDATA formula problem with apostrophe

    Excel 2010 on Win7 - Having a problem with the GETPIVOTDATA formula.
    GETPIVOTDATA(data_field, pivot_table[, field1, item1]
    If "data_field", "field1" or "item1" contain a value that has an apostrophe (i.e. single quote), the function returns a #REF! error. It works fine in all other cases. I tried placing those values within brackets (ex: "[Moody's]")
    and using the old SQL trick of doubling up the apostrophe (ex: "Moody''s"), and combining both those methods. But no luck. Has anyone else been able to solve this problem?
    Thanks.

    Hi Marak,
    Thank you for posting in the MSDN Forum.
    Since the issue is more relate to the end-user, I'd like to move it to Excel IT pro forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Best regards
    Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • ICloud on Windows 7, Corporate AD, Proxy, and Outlook 2007

    See lots of discussions around this and since I managed to get mine to work, wanted to post this for all. Hope it helps. Originally Posted this as a response to another thread. This is all trying to get iCloud control panel 2x and now 3.0 to work in

  • Erro while creating a new user

    Hi, I tried to create an user. In the mass_user.txt i had given the complete details. When importing the mass_user.txt, from user administration, getting error:" E-mail Address cant be empty". Plz assist. Regards, Dhanu

  • Conversion rules

    hi, plz suggest me anything(their types,significance etc.) about CONVERSION RULES in ABAP.

  • Making Photo Slideshows along with movies

    Does FCE HD or FCP HD make good quality slideshows. iMovie seems to lose a lot of quality wihen making slideshows with photos. I am looking to make a DVD with movies as well as photos, and I am wondering what would app would give me the best quality.

  • Lot of time to wait until X starts

    Hi people. I have everything up to date and I'm currently starting my DE using Start X at Boot. This is my .xinitrc: # Make sure this is before the 'exec' command or it won't be executed. [ -f /etc/xprofile ] && . /etc/xprofile [ -f ~/.xprofile ] &&