Escape character " is not escaped

I have an application that posts information to a browser. I have the same problem with all the HTML tags.
The problem arises when I escape " (quote). For example, this function:
protected String formatAnswerHTML( String answerText ){
StringBuffer returnString = new StringBuffer("<font class=\"agentName\">");
returnString.append(agentName);
returnString.append(": </font><font class=\"agentMssg\">");
returnString.append(super.insertHyperlinksAtOptions(answerText));
returnString.append("</font>");
return returnString.toString();
generates the following output:
<FONT class=\"agentName\">Alex: </FONT><FONT class=\"agentMssg\">Hello and welcome to Ericsson Customer service. Please enter your question in plain English or select from the menu below.<BR></FONT>
Does someone has a clue as to why the \" doesn't work?

If you need to fix it quickly, and if it works for your browser, you can use single quotes instead of double quotes, so you don't have to escape them. Like:
print("<img src='image.gif'>");
That should work, since most browsers let you use single quotes. But if you are strict on consistancy, you might not like having single quotes in some places and double quotes in others...but that's only if you are worried about it.

Similar Messages

  • Character '$' is not allowed in an XML tag name. /ERROR

    Hi,
    I was testing cli command java OracleXML getXML ....
    getting following error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Character '$' is not allowed in an XML tag name.</ERROR>
    This was because the database column name included $ characters.
    Question 1: Is it possible use getXML/putXML cli operations for tables containig these $ columns
    and how?
    Now I found the method setSQLToXMLNameEscaping(true) and tried the same query using the modified
    sample java code of XSU documentation. This time I got error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: You are using an old version of the gss library; thus, sql-xml name escaping is not supported.</ERROR>
    Question 2: What is this gss library and is there up-to-date version available - and will it solve my
    $ problem?
    Thanks,
    Olavi

    Hi,
    I was testing cli command java OracleXML getXML ....
    getting following error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Character '$' is not allowed in an XML tag name.</ERROR>
    This was because the database column name included $ characters.
    Question 1: Is it possible use getXML/putXML cli operations for tables containig these $ columns
    and how?Please use alias in your SQL query for the column with $, like
    select sys$rowno_info as rowinfo..OK for getXML but how to do this with putXML?
    Now I found the method setSQLToXMLNameEscaping(true) and tried the same query using the modified
    sample java code of XSU documentation. This time I got error result:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: You are using an old version of the gss library; thus, sql-xml name escaping is not supported.</ERROR>
    Question 2: What is this gss library and is there up-to-date version available - and will it solve my
    $ problem?gss libs is ithe nls_charset12.jar located in jdbc/lib.
    Olavi
    I added nls_charset12.jar dated july 2002 into my classpath without
    success?
    Olavi

  • Oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XM

    I need to use query-database functionality in transform activity to make a stored function call. My sql query parameter should be
    Select CDMB_BPEL_UTILS_PKG.get_coa(null) from dual
    Corresponding XML is
    ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.example.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" exclude-result-prefixes="xsl ns0 xsd ldap xp20 bpws ora orcl">
    <xsl:template match="/">
    <ns0:OracleRoot>
    <ns0:OracleMappedOut>
    <ns0:ExpType>
    <xsl:value-of select="orcl:query-database('select cdmb_bpel_utils_pkg.get_coa(null) from dual',false(),false(),'eis/JNDI/GDB2')"/>
    </ns0:ExpType>
    </ns0:OracleMappedOut>
    =========But I get the following error when testing the same===========
    oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name
    ========================================================
    I guess I need to use escape characters to pass ( . I tried using &quot; and &apos; but in vain. Any help is appreciated to resolve this issue.

    Siva,
    version: 10.1.3.4
    Your inputs may be of high use for me as well.
    I have similar requirement. I have to execute the following sql query
    select sum(salary) from emp. When I run this query using ora:orcl:query-database, I got the same exception what you have got. So do you mean if i use an alias for this, it would solve my pbm?
    select sum(salary) sal from emp+
    rgds,
    sen

  • New character style not showing up in TOC style

    I created a new character style called Subchapter....
    Then I went to layout>toc styles.. and hit [new]. Under "Style" my new character style "Subchapter" is not there. Also, under the "Styles in Table of Contents....include paragraph styles.." my new character style "Subchapter" is not in the other styles list.
    What am I missing?
    Thanks.
    Also, forgot to mention, I am in book mode at this point. Maybe I need to add that new character style to each .IDD chapter of the book?

    NEvermind, it was because I was making a character style, not a paragraph style. Now it shows up.
    Thanks anyways.

  • Problem with CONVERT_OTF, special character '-' printing not properly

    Hi experts,
    when printing PO item text; in Print Preview, text displays correctly. But in program by using 'CONVERT_OTF' FM output is converting into PDF and this PDF is send it to the PO creator through mail,   In the PDF present in the mail, the special character ' - ' is not displaying properly; i.e the special character ' - ' is replaced by '  ' space. For the text we are using Text editor and Font family is 'COURIER' , device type is 'PDF'.   And also i tried with different Font fammilies, for that it beheaves differently but not displays as it is the special character ' - '.
    Thanks and regards
    Aumprakasharya T

    Hi,
    Which device type is used to create the PDF? i.e. which deivce type is used in the OTF data that is converted to PDF? If you use device type PDFUC or SWINCF, then it should work fine. (see SAP not #999712 about unicode PDF conversion)
    Regards,
    Aidan

  • Oracle 6i report on pdf veitnam character is not displaying properly

    Dear ALL,
    we are facing problem to display 6i report on pdf for veitnam characters.
    we have database characterset is UTF8.
    and client also is UTF8.
    report in 6i rport is displaying corect to save that in pdf some vietnam character is not displaying proper on pdf.
    thanks in advance.
    sher khan

    we used UTF8 which worked fine with that.

  • Character Set not supported

    Hi,
    I use Repository Administrative to create a new repository, but i got a error: "process aborted"
    Then i checked the log file, which is Character Set not support from type 31 to type 852
    anybody knows any solution about that
    Thanks in advance

    Just ran into this myself yester day.
    There is a Metalink Note on it.
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=NOT&p_id=190281.1
    Problem Description
    You are using OC4J and trying to connect to a database using JDBC OCI and
    are getting:
    "java.sql.SQLException: Character Set Not Supported !!: DBConversion"
    Solution Description
    Replace the <OC4J_HOME>\jdbc\lib\classes12dms.jar with
    <ORACLE_HOME>\jdbc\lib\classes12.jar and rename it with classes12dms.jar.
    Explanation
    It seems there is a mismatch of classes12.zip supplied with OC4J 9.0.2
    and the Oracle9i client libraries ocijdbc8.dll or ocijdbc8.so.
    OC4J 9.0.2 does not use jdbc\lib\classes12.jar instead it uses
    jdbc\lib\classes12dms.jar. So, in order to use the 9.0.1 client with OC4J, you
    will need to make a copy of classes12.jar and rename it to classes12dms.jar
    References
    [NOTE:108876.1] Creating Connection gives "No ocijdbc8 in java.library.path"
    [NOTE:174808.1] JDev9i and OCI Connections
    I copied and renamed the jar (classes12.jar) as they stated.
    Note: It should be in the directory you set in the JDev.conf, mine is
    AddNativeCodePath D:\OraNT\9iDS\bin
    Didn't try the other reply's suggestion of setting an environment variable.

  • Find Whether String Contain Sequence Of Character Or Not

    <b>
    hello friend,
    I am to the new java. I need to findout whether the string contain sequence of character or not. I tried like this
    personLastName.length()> 0
    It will return true even my string contains space. Is there any other method in java to find out ?
    Thanks

    There are a few ways to do that. Check out the String class or Regex for one that suits but
    myString.indexOf(whatIWantToFindString)is an old favorite. It returns -1 if the sequence is not there, or the starting index if it is. The javadocs are your friends.
    regards

  • SQLException Character Set Not Supported

    I'm at wit's end.
    I have the following versions:
    Win2k
    JDeveloper 9i R2
    Oracle9iAS 9.0.3.0.0
    Oracle 9i client 9.0.1.1
    Sun J2SDK 1.3.1
    Oracle 9i Enterprize Edition 9.0.1.3.0
    I'm trying to get a JDBC connection from a DataSource in a servlet. The result is the following error: java.sql.SQLException: Character Set Not Supported !!: DBConversion.
    I get the same problem just trying a simple JDBC connection in JDeveloper. I can fix this problem by forcing JDeveloper to use classes12.jar from the Oracle client directory BEFORE oc4j.jar in the JDeveloper libraries.
    Unfortunately, I can't get the external 9iAS server to make this switch. It's (naturally) using its copy of oc4j.jar.
    Any ideas on:
    1) How to properly avoid the Character Set error.
    2) How to force 9i AS to use different libraries before it looks in oc4j.
    Any help is greatly appreciated

    I have tried the embedded server in JDeveloper with the same results. Currently, I am using the external one.
    I believe the data source is valid. I can duplicate this problem by just using a plain JDBC connection from DriverManager. Also, I switched to the 1.0.2 version of oc4j, replaced the Oracle stuff with 8i versions and was able to connect using the same data-sources.xml.
    This problem also goes away when using the thin driver but we're reluctant to use the thin driver for performance reasons.
    Thanks for the response,
    TG

  • Character set not supported!! DBConversion error. Need Help!

    I installed JDeveloper9.2 on windows 2000. When I try to make a database server connection by using OCI8 driver, it gives me a "Character set not supported DBConversion error". After that I tried to connect database by using Thin driver, everything is OK. I really need your help.
    I used database connection wizard to make the connection. Connection type I selected ORACLE(JDBC) and drive I selected OCI8. After that I tried to test connection, it gave me above error. I noticed that JDeveloper did not talked with database server at all, I tried to connect with a database server which does not exist, it still gave me the same error.

    Just ran into this myself yester day.
    There is a Metalink Note on it.
    http://metalink.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=NOT&p_id=190281.1
    Problem Description
    You are using OC4J and trying to connect to a database using JDBC OCI and
    are getting:
    "java.sql.SQLException: Character Set Not Supported !!: DBConversion"
    Solution Description
    Replace the <OC4J_HOME>\jdbc\lib\classes12dms.jar with
    <ORACLE_HOME>\jdbc\lib\classes12.jar and rename it with classes12dms.jar.
    Explanation
    It seems there is a mismatch of classes12.zip supplied with OC4J 9.0.2
    and the Oracle9i client libraries ocijdbc8.dll or ocijdbc8.so.
    OC4J 9.0.2 does not use jdbc\lib\classes12.jar instead it uses
    jdbc\lib\classes12dms.jar. So, in order to use the 9.0.1 client with OC4J, you
    will need to make a copy of classes12.jar and rename it to classes12dms.jar
    References
    [NOTE:108876.1] Creating Connection gives "No ocijdbc8 in java.library.path"
    [NOTE:174808.1] JDev9i and OCI Connections
    I copied and renamed the jar (classes12.jar) as they stated.
    Note: It should be in the directory you set in the JDev.conf, mine is
    AddNativeCodePath D:\OraNT\9iDS\bin
    Didn't try the other reply's suggestion of setting an environment variable.

  • Just downloaded Lion 10.7.5 and it has stopped Minecraft working correctly. Screen jumps like an earthquake and character will not move. Any ideas? Thanks, John

    Just updated OS X to latest 10.7.5 and I am using Minecraft 1.3.2.
    After loading software Minecraft screen is like being in an earthquake jittering up and down while the character will not move out of its existing square. I can use tools but not move.
    Anyone any similar experience or solution?
    Thanks

    Thanks Tom. Whilst their site did not resolve the issue you did make me think about creating a New World in Minecraft. This created fine and does not exhibit the problems. I guess the last game is just corrupt and not an OS X issue and is just a coincidence.
    Thanks
    John

  • Key board character can not recognizing..

    Hello,
    I have connected three sun servers to common key board , mouse and monitor using KVM switch. I am using Gateway keyboard. It is working fine except | (pipe) character is not recognizing. Can anyone help me please ?.
    Thanks
    Regards,
    NP

    Hi Shilpi Agarwal,
                    You can give the ONENTER action for your input fields where you enter the data and call the button event
                    from that action as below.
      method ONACTIONENTER .
      data lr_event type ref to cl_wd_custom_event.
      wd_this->onactionbuttonclick(  " This method is the one created for your button click
      wdevent = lr_event             
       endmethod.

  • Satellite A300-15K: Polish character does not appear using shortcut key

    Hi,
    I am a fresh user of A300-15K and from the start I have discovered that it has combination of Alt+Ctr+C assigned to starting up ATI software (Catalyst Control Centre). Unfortunatelly this combination normally should produce Polish character "?" ( it doesn't look properly on this page somehow after I have copied it from Word - it is "c" with stong accent over it - here is its capital version "?").
    I entered Catalyst Control Centre and unmarked the use of so called HotKeys (first this particular hotkey and then the use of hotkeys generally), but all I achieved was that Catalyst Control Centre stopped starting up after the combination usage.
    However, the needed Polish character did not appear. I can get its capital version with Alt+Ctr+Shift+c, but no normal version.
    A guy from service centre advised me to assign a different letter as startup combination for Catalyst Control Centre and I did, but it still did not make the Polish character appear.
    I guess there must be a fault in regional settings so I tried to change them to English and back to Polish with zero result.
    Please help with some word of advise.
    Message was edited by: Koster62

    Its easy to turn off.
    Just enter the catalyst driver and there must be option like 'shortcut'. Turn it off.
    I had the same problem.
    I remember only it was really easy to turn off.
    You shouldn't have problem with that.

  • How do I check to see if a character is NOT contained in a String?

    I am trying to create a program which will read in user inputted text. If the text contains an email address, then the program will output it to screen. However, I also need to put some sort of fall back in there, in case an email address is not contained in the string.
    This is the part I am having problems with. If I enter an email address, it will output it to screen. Maybe someone can help me with a "no valid mail" message.
    I decided to use the '@' character as a reference point, since it is a unique character and should not be used in normal sentances. Since an email address is a continous block of text with no spaces in it,I created 2 substrings - one from '@' going backwards towards the previous space, and one from '@' going forward to the next space.
    First, I tried the following:
    //if(input.indexOf('@') == -1){
         // System.out.println("-no valid email-");
    The program ran and when I entered text containing an email adress, it displayed it on screen. If I didn't include one, it gave me an error: java.lang.StringIndexOutOfBoundsException: -1
    I'm guessing this is happening because if there is no '@' symbol in the user input, and so there is an error with the indexOf('@') statement. Any way to get around this?
    Then I tried the following, bearing in mind the variable length is defined as "input.length()".
    for(int i = 0; i <= length; i++){
         if(input.charAt(i) = '@'){
              break;
         if(i == length){
         System.out.println("-no valid email-");
    this gives me an "unexpected type" error with the if(input.charAt(i) = '@') statement.
    It says it has found a value, but requires a variable. Is the "i" in the FOR loop not a variable?
    Please can anybody help me. Any suggestions appreciated.

    Whenever I run the program, it is ok if I input an email address among the text. IT displays the email address to screen. However, if no email address is entered (ie. just a string of text), it displays the message "-no valid email". But it still gives me an error:
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind
    ex out of range: -1
    at java.lang.String.charAt(String.java:558)
    at CA3a.main(CA3a.java:56)
    Here is my code in full:
    //I decided to use the '@' character as a reference point, since it is a unique character
    //and should not be used in normal sentances. Since an email address is a continous block
    //of text with no spaces in it,I created 2 substrings - one from '@' going
    //backwards towards the previous space, and one from '@' going forward to the next space.
    class CA3a{
       public static void main(String args[]){
    //variable declerations
         String input;
         int indexat, length;
         String part1 = "";
         String part2 = "";
    //prompt user for input
         System.out.println("This program will detect the 1st email address in a string of text.");
         System.out.println("Please enter a string of text");
    //take in input into a stringbuffer
         input = Keyboard.readString();
         StringBuffer buff = new StringBuffer(input);
    //assignments
         length = input.length();
         indexat = input.indexOf('@');
    //check to see if '@' character is present in string
         if(indexat < 0){
            System.out.println("-no valid email-");
    //check for substring part1
         for(int i = indexat; i >= 0; i--){
            if(i == 0){
              part1 = buff.substring(i, indexat);
              break;
            if(input.charAt(i-1) == ' '){
              part1 = buff.substring(i, indexat);
              break;
    //check for substring part2
         for(int i = indexat; i <= length; i++){
            if(i == length){
              part2 = buff.substring(indexat, i);
              break;
            if(input.charAt(i) == ' '){
              part2 = buff.substring(indexat, i);
              break;
    //output the 2 substring variables to screen.
    System.out.println(part1 + part2);
    }

  • Character panel not displaying all options

    Hi!
    I need some help, when I open the character panel it only displays about half of the type changing options, such as kerning, leading, tracking & font size.
    it does not display the stretching or the other four options to manipulate text. can anyone help me??
    When I used to have CS3 it did, and now with CS5 I'm not sure why it's not automatically displaying everything in the character panel.
    Any help would be greatly appreciated!

    Panel flyout menu --> Show Options
    Mylenium

Maybe you are looking for