Special char in contains

hi,
when I try to query with char like '-' or '=' it gives following error
ERROR at line 1:
ORA-20000: Oracle Text error:
DRG-50901: text query parser syntax error on line 1, column 3
The condition in the sql is like this
contains (myFILENAME,'-',1) > 0)
How can I search only with '-' or '=' char's?
ORacle version 9i windows.
thanx.
sam

scott@ORA92> drop table your_table
  2  /
Table dropped.
scott@ORA92> create table your_table (your_column varchar2(80))
  2  /
Table created.
scott@ORA92> insert all
  2  into your_table (your_column) values ('4 - 2 = 2')
  3  into your_table (your_column) values ('4 + 2 = 6')
  4  into your_table (your_column) values ('Test-drive before buying.')
  5  into your_table (your_column) values ('other data')
  6  select * from dual
  7  /
4 rows created.
scott@ORA92> exec ctx_ddl.drop_preference ('your_lexer')
PL/SQL procedure successfully completed.
scott@ORA92> begin
  2    ctx_ddl.create_preference ('your_lexer', 'BASIC_LEXER');
  3    ctx_ddl.set_attribute ('your_lexer', 'printjoins', '-=');
  4  end;
  5  /
PL/SQL procedure successfully completed.
scott@ORA92> create index your_index
  2  on your_table (your_column)
  3  indextype is ctxsys.context
  4  parameters ('LEXER your_lexer')
  5  /
Index created.
scott@ORA92> select token_text from dr$your_index$i
  2  /
TOKEN_TEXT
2
4
6
=
BEFORE
BUYING
DATA
TEST-DRIVE
9 rows selected.
scott@ORA92> select *
  2  from   your_table
  3  where  contains (your_column,'%\-%',1) > 0
  4  /
YOUR_COLUMN
Test-drive before buying.
4 - 2 = 2
scott@ORA92> select *
  2  from   your_table
  3  where  contains (your_column,'%\=%',1) > 0
  4  /
YOUR_COLUMN
4 + 2 = 6
4 - 2 = 2
scott@ORA92> select *
  2  from   your_table
  3  where  contains (your_column,'{-}',1) > 0
  4  /
YOUR_COLUMN
4 - 2 = 2
scott@ORA92> select *
  2  from   your_table
  3  where  contains (your_column,'{=}',1) > 0
  4  /
YOUR_COLUMN
4 + 2 = 6
4 - 2 = 2
scott@ORA92>

Similar Messages

  • Problem with special chars in BLOB datatype using contains keyword

    Facing problem, when part searching with special chars in BLOB datatype. It is considering the non alpha-numeric chars as a separtor in a provided string
    EX:
    SELECT *
    FROM RESUME_TEST P,grst_candidate d
    WHERE d.candidate_id = p.candidate_id
    AND CONTAINS(P.CAND_RESUME,'%VB.NET%',1) > 0
    Strings: , VB.NET , PL/SQL AS/400 , C etc..
    Followed the below approaches
    1) created a table:
    Syntax: create table resume_Test(cand_id number(10),cand_resume blob);
    2) inserted the values into this table upto 60,000
    3) created a context index
    3.1 created preferences
    Syntax:
    BEGIN
    ctx_ddl.create_preference('try_lexer3','BASIC_LEXER');
    ctx_ddl.set_attribute('try_lexer3','printjoins','-_~!@#$%^&*(){}[],=?\;|><.+');
    END;
    3.2 created context index
    Syntax:
    CREATE INDEX CANDRESUME_CTX_IDX ON resume_test (cand_resume)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('LEXER try_lexer3 memory 500M');
    4) while executing this index, it is taking much time approx 6 hrs(plz explain why it is taking time)
    5) Problems:
    5.1 when searching with string(VB.NET , PL/SQL AS/400 , C etc..) it is considering the special char as a separator
    5.2 used escape char (\) also, but no effect
    5.3 when searching with single char, it is giving error (ORA-29902,ORA-20000,DRG-51030)
    5.4 getting the above error with wild card chars (& ,_, (),{},[])
    So, please explain the clear scenarios, why am getting this error , and how to get the proper results.

    Have you tried adding the / char to the printjoin characters?
    Indexing can take a lot of time, depending on the amount of data and your machine's power. You could try to parallelize the index creation and / or assign more memory
    CREATE INDEX CANDRESUME_CTX_IDX ON resume_test (cand_resume)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('LEXER try_lexer3 memory 2000M') PARALLEL 8;

  • Spliting a large string using regular expression which contain special char

    I have huge sting(xml) containing normal character a-z,A-Z and 0-9 as well as special char( <,>,?,&,',",;,/ etc.)
    I need to split this sting where it ends with </document>
    for e.g.
    Original String:
    <document>
    <item>sdf</item>
    <item><text>sd</text</item>
    </document>
    <document>hi</document>
    The above sting has to be splited in to two parts since it is having two document tag.
    Can any body help me to resolve this issue. I can use StringTokenizer,String split method or Regular expression api too.

    manas589 wrote:
    I used DOM and sax parser and got few exception. Again i don't have right to change xml. so i thought to go with RegularExpression or some other way where i can do my job.If the file actually comes in lines like what you posted, you should just be able to compare the contents of each line to see if it contains "</document>" or whatever you're looking for. I wouldn't use regex unless I needed another problem.
    I got excpetion like: Caused by: org.xml.sax.SAXParseException: The entity "nbsp" was referenced, but not declared.
         at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
         at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)So then it isn't even XML.
    Edit: sorry, I just realized why you're considering all of these heavy-duty ideas. It's just that you don't know how to break the string into lines. You do it like this:
    BufferedReader  br = new BufferedReader(new StringReader(theNotXMLString));

  • OUTBOUND XML FILE CONTAINS SPECIAL CHARS AFTER SP08 UPGRADE

    Experts,
    Recently MDM server upgraded to SP08 from SP05.
    In our outbound interface scenario we have 1 hierarchy field. The hierarchy field mapped as complete path(parent to Child)
    ex: 1,Parent > 11,Child > 111,Child > 1111,Child.
    In SP05 XML files are generating correctly & PI also dont have any issues while passing this data to ECC.
    After SP08 Server pack upgrade, xml file generating like  below:
    1??, ??Parent??, ???>?11??, ??Child??, ???>?111??, ??Child??, ???>?1111??, ??Child??, ???
    If open the xml file in non ASCC editor I could able to see these special chars. Due to this ISSUE PI could not processing xml files.
    All XML files are failing& blocking in PI.
    Could you let me know what needs to be done at MDM or PI level.
    Appreciate your inputs.
    Thanks
    Audinarayana

    Hello,
    Please check the Destination preview in the syndicator.
    So an syndication on the local machine, open the XML in an Browser, to see check for the special characters.
    If every things is ok, then just place the file in the outbound ready folder.
    If not then, raise an OSS message with SAP, as this a latest release, error resolution would be best provided by SAP
    Regards,
    Abhishek

  • Issue: Not getting response when the document is having special chars

    Please help following issue: Not getting response when the document is having special chars(Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
    Error message:
    System.FormatException: Invalid length for a Base-64 char array. at
    System.Convert.FromBase64String(String s) at
    Summarize.Summarizer.AccumulateBroadcast(String filedata, String givenWords) in
    c:\DocumentSummarizer\App_Code\Summarizer.cs:line 66
    Code:
    File 1:
    import java.io.BufferedReader;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStream;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.net.URLConnection;
    import java.util.Properties;
    import org.apache.poi.poifs.filesystem.POIFSFileSystem;
    import org.apache.poi.hwpf.*;
    import org.apache.poi.hwpf.extractor.*;
    import com.lowagie.text.Document;
    import com.lowagie.text.pdf.PRTokeniser;
    import com.lowagie.text.pdf.PdfReader;
    public class DocumentSummarizerClient {
         static Properties loadProperties() {
              Properties prop = new Properties();
              try {
                   prop.load(DocumentSummarizerClient.class.getClassLoader().getResourceAsStream("vep.properties"));
              } catch (Exception ioe) {
                   ioe.printStackTrace();
              return prop;
         public String getSummary(String fileName,String noOfWordsOrPercentage ){
              String summaryInputData ="";
              String summarizedData="";
              String summarizerURL = loadProperties().getProperty("Summarizer.serviceURL");
              try {
                   String fileExtension=fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
                   if (fileExtension.equalsIgnoreCase("doc")|| fileExtension.equalsIgnoreCase("txt")|| fileExtension.equalsIgnoreCase("pdf")) {
                                  if (fileExtension.equalsIgnoreCase("txt")) {
                                       BufferedReader bufferedReader = new BufferedReader(
                                                 new FileReader(fileName));
                                       String line = null;
                                       while ((line = bufferedReader.readLine()) != null) {
                                            summaryInputData += line;
                                  if(fileExtension.equalsIgnoreCase("doc")){
                                       POIFSFileSystem fs = null;
                                        fs = new POIFSFileSystem(new FileInputStream(fileName));
                                         HWPFDocument doc = new HWPFDocument(fs);
                                         WordExtractor we = new WordExtractor(doc);
                                         String[] paragraphs = we.getParagraphText();
                                         for( int i=0; i<paragraphs .length; i++ ) {
                                            paragraphs[i] = paragraphs.replaceAll("\\cM?\r?\n","");
                                  summaryInputData+= paragraphs[i];
                                  if(fileExtension.equalsIgnoreCase("pdf")){
                                       Document document = new Document();
                   document.open();
                   PdfReader reader = new PdfReader(fileName);
                   int pageCount =reader.getNumberOfPages();
                        for(int i=1;i<=pageCount;i++){
                                  byte[] bytes = reader.getPageContent(i);
                                  PRTokeniser tokenizer = new PRTokeniser(bytes);
                                  StringBuffer buffer = new StringBuffer();
                                  while (tokenizer.nextToken()) {
                                  if (tokenizer.getTokenType() == PRTokeniser.TK_STRING) {
                                  buffer.append(tokenizer.getStringValue());
                                  summaryInputData += buffer.toString();
                   else{
                        System.out.println("This is Invalid document. Presntly we support only text,word and PDF documents ");
                   // String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
                   // encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
                        summarizedData= postRequest(parameters,summarizerURL);
                        String slength= "<string xmlns=\"http://tempuri.org/\">";
                        if(summarizedData.contains("</string>")){
                        summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
                        summarizedData = replaceVal(summarizedData);
                        //System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
                        // System.out.println("Summarized data "+summarizedData);
                        if(summarizedData.contains("Please enter the percentage")){
                             summarizedData="Data given cannot be summarized further";
                   else{
                        System.out.println("Data given cannot be summarized further");
                        summarizedData="";
              } catch (FileNotFoundException e) {
                   return("The File is not found \n\n"+e.toString());
              } catch (IOException e) {
                   return("The File is already in use \n\n"+e.toString());
              } catch (Exception e) {
                   return(e.toString());
              return summarizedData;
         public static String postRequest(String parameters,String webServiceURL) throws Exception{
              Properties systemSettings = System.getProperties();
              systemSettings.put("http.proxyHost", loadProperties().getProperty("proxyHost"));
         systemSettings.put("http.proxyPort", loadProperties().getProperty("proxyPort"));
         System.setProperties(systemSettings);
              String responseXML = "";
              try {
                   URL url = new URL(webServiceURL);
                   URLConnection connection = url.openConnection();
                   HttpURLConnection httpConn = (HttpURLConnection) connection;
                   byte[] requestXML = parameters.getBytes();
                   httpConn.setRequestProperty("Content-Length", String
                             .valueOf(requestXML.length));
                   httpConn.setRequestProperty("Content-Type",
                             "application/x-www-form-urlencoded");
                   httpConn.setRequestMethod("POST");
                   httpConn.setDoOutput(true);
                   httpConn.setDoInput(true);
                   OutputStream out = httpConn.getOutputStream();
                   out.write(requestXML, 0, requestXML.length);
                   out.close();
                   InputStreamReader isr = new InputStreamReader(httpConn
                             .getInputStream());
                   BufferedReader br = new BufferedReader(isr);
                   String temp;
                   String tempResponse = "";
                   while ((temp = br.readLine()) != null)
                        tempResponse = tempResponse + temp;
                   responseXML = tempResponse;
                   br.close();
                   isr.close();
              } catch (java.net.MalformedURLException e) {
                   System.out
                             .println("Error in postRequest(): Secure Service Required");
              } catch (Exception e) {
                   System.out.println("Error in postRequest(): " + e.getMessage());
              return responseXML;
         public String replaceVal(String value) {
                   if (value == null) {
                        value = "";
                   value = value.replace("&lt;", "<");
                   value = value.replace("&gt;", ">");
                   value = value.replace("&amp;", "&");
                   return value;
              public static void main(String[] args) {  
                   DocumentSummarizerClient testdoc=new DocumentSummarizerClient();
                   System.out.println("hello");               
                   testdoc.getSummary("C:\\working_folder\\vep\\UnitTestCases\\VEP1.0\\DocumentSummarizerTestData\\TestErrorFour.doc","100%");     
    Note: Use any doc with special char(ex: &, $, <, >,.....) TestErrorFour.doc
    File 2:
    ---------public class Base64Utils {
    private static byte[] mBase64EncMap, mBase64DecMap;
    * Class initializer. Initializes the Base64 alphabet (specified in RFC-2045).
    static {
    byte[] base64Map = {
    (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F',
    (byte)'G', (byte)'H', (byte)'I', (byte)'J', (byte)'K', (byte)'L',
    (byte)'M', (byte)'N', (byte)'O', (byte)'P', (byte)'Q', (byte)'R',
    (byte)'S', (byte)'T', (byte)'U', (byte)'V', (byte)'W', (byte)'X',
    (byte)'Y', (byte)'Z',
    (byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e', (byte)'f',
    (byte)'g', (byte)'h', (byte)'i', (byte)'j', (byte)'k', (byte)'l',
    (byte)'m', (byte)'n', (byte)'o', (byte)'p', (byte)'q', (byte)'r',
    (byte)'s', (byte)'t', (byte)'u', (byte)'v', (byte)'w', (byte)'x',
    (byte)'y', (byte)'z',
    (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5',
    (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'+', (byte)'/'};
    mBase64EncMap = base64Map;
    mBase64DecMap = new byte[128];
    for (int i=0; i<mBase64EncMap.length; i++)
    mBase64DecMap[mBase64EncMap[i]] = (byte) i;
    * This class isn't meant to be instantiated.
    private Base64Utils() {
    * Encodes the given byte[] using the Base64-encoding,
    * as specified in RFC-2045 (Section 6.8).
    * @param aData the data to be encoded
    * @return the Base64-encoded <var>aData</var>
    * @exception IllegalArgumentException if NULL or empty array is passed
    public static String base64Encode(byte[] aData) {
    if ((aData == null) || (aData.length == 0))
    throw new IllegalArgumentException("Can not encode NULL or empty byte array.");
    byte encodedBuf[] = new byte[((aData.length+2)/3)*4];
    // 3-byte to 4-byte conversion
    int srcIndex, destIndex;
    for (srcIndex=0, destIndex=0; srcIndex < aData.length-2; srcIndex += 3) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
    (aData[srcIndex] << 4) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+2] >>> 6) & 003 |
    (aData[srcIndex+1] << 2) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[aData[srcIndex+2] & 077];
    // Convert the last 1 or 2 bytes
    if (srcIndex < aData.length) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] >>> 2) & 077];
    if (srcIndex < aData.length-1) {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] >>> 4) & 017 |
    (aData[srcIndex] << 4) & 077];
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex+1] << 2) & 077];
    else {
    encodedBuf[destIndex++] = mBase64EncMap[(aData[srcIndex] << 4) & 077];
    // Add padding to the end of encoded data
    while (destIndex < encodedBuf.length) {
    encodedBuf[destIndex] = (byte) '=';
    destIndex++;
    String result = new String(encodedBuf);
    return result;
    * Decodes the given Base64-encoded data,
    * as specified in RFC-2045 (Section 6.8).
    * @param aData the Base64-encoded aData.
    * @return the decoded <var>aData</var>.
    * @exception IllegalArgumentException if NULL or empty data is passed
    public static byte[] base64Decode(String aData) {
    if ((aData == null) || (aData.length() == 0))
    throw new IllegalArgumentException("Can not decode NULL or empty string.");
    byte[] data = aData.getBytes();
    // Skip padding from the end of encoded data
    int tail = data.length;
    while (data[tail-1] == '=')
    tail--;
    byte decodedBuf[] = new byte[tail - data.length/4];
    // ASCII-printable to 0-63 conversion
    for (int i = 0; i < data.length; i++)
    data[i] = mBase64DecMap[data[i]];
    // 4-byte to 3-byte conversion
    int srcIndex, destIndex;
    for (srcIndex = 0, destIndex=0; destIndex < decodedBuf.length-2;
    srcIndex += 4, destIndex += 3) {
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
    ((data[srcIndex+1] >>> 4) & 003) );
    decodedBuf[destIndex+1] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
    ((data[srcIndex+2] >>> 2) & 017) );
    decodedBuf[destIndex+2] = (byte) ( ((data[srcIndex+2] << 6) & 255) |
    (data[srcIndex+3] & 077) );
    // Handle last 1 or 2 bytes
    if (destIndex < decodedBuf.length)
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex] << 2) & 255) |
    ((data[srcIndex+1] >>> 4) & 003) );
    if (++destIndex < decodedBuf.length)
    decodedBuf[destIndex] = (byte) ( ((data[srcIndex+1] << 4) & 255) |
    ((data[srcIndex+2] >>> 2) & 017) );
    return decodedBuf;
    issue 2: Exception when passing 2MB .txt file
    Steps to reproduce:
    Call getSummary() with 2MB .txt file
    Actual:
    The following exception has occured:
    1. Error in postRequest(): Unexpected end of file from server
    java.lang.NullPointerException
    Please provide your precious feedback/suggestions.
    Thanks in advance…..
    Edited by: EJP on 15/03/2011 16:52: added code tags. Please use them. Code is unreadable otherwise.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Thanks for your response….
    This is enhancement project and some one develops long back.
    Regarding point (b) You should be using the java.net.URLEncoder to encode URL parameters, not a base64 encoder.
    DocumentSummarizerClient.java I am using base64
    Ex:
    // String encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String encoded=Base64Utils.base64Encode(summaryInputData.getBytes());
                   // encoded =new String (summaryInputData.getBytes("ISO-8859-1"),"UTF-8");
                        String parameters= "base64String="+encoded+"&noOfWordsOrPercentage="+noOfWordsOrPercentage;
                        summarizedData= postRequest(parameters,summarizerURL);
                        String slength= "<string xmlns=\"http://tempuri.org/\">";
                        if(summarizedData.contains("</string>")){
                        summarizedData= summarizedData.substring(summarizedData.indexOf(slength)+slength.length(),summarizedData.indexOf("</string>"));
                        summarizedData = replaceVal(summarizedData);
                        //System.out.println("<?xml version=\"1.0\" encoding=\"utf-8\"?><![CDATA["+summarizedData+"]]>");
                        System.out.println("Summarized data "+summarizedData);
                        if(summarizedData.contains("Please enter the percentage")){
                             summarizedData="Data given cannot be summarized further";
    Above specific please I need to modify to resolve above issue.
    Could you please suggest me what changes I need to do.
    Waiting for positive response.

  • Handling special char at BizTalk end?

    I am receiving message as flat file which may contain special char like <> ' "....... etc
    Can any one tell me how can i handle it at BizTalk end.
    If i am converting it into xml due to data, it is not a valid xml.
    <FirstName> <John miller</FirstName>
    And single quotes ' can create problem in sql query .
    Can any one let me know how could i handle it.

    Hi Phill,
    Let’s be clear when you mean by “special character” in flat-file schema.
    If the special character which your referring are not the delimiters used in your schema or any escape characters (about escape characters I’ll refer later), then as la
    Cour said, XML shall handle them without any issues. If you have these characters, as you highlighted, you will have XML file/element like “<FirstName>
    <John miller</FirstName>”. It’s still a valid XML file.
    But if you don’t want this characters to be saved into SQL database i.e for the above XML element if don’t want the character “<” saved along with “John
    miller” as “<John miller”, then you need to have a custom pipeline component to remove those characters.
    Escape character:
    If you know that a character which could come in an element, then you can use “Escape Character” property for the element where you can specify the character you want to
    ignore. i.e of you expect character “<” to come with FirstName element, then you can specify the escape character property as “<” in the “FirstName” element.
    More special character to ignore:
    As said XML can parse these characters without issue. But if you don’t want to send those characters to your destination system (SQL), then after parsing the flat-file into
    XML, use a custom pipeline component to replace all the special character from the parsed XML.
    Following article discuss about this concept:
    How
    to remove invalid character in incoming XML message using custom pipeline component
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Special Char are not allowing

    Hi all,
    here i am facing the problem while activating the DSO...
    the error was Value " ºu0152Öݱ±u0178©CA1715" from characteristic 0ALLOC_NMBR contains an error
    we have given in RSKC --> ALL_CAPITAL_PLUS_HEX and ALL_CAPITAL also     
    this 0ALLOC_NMBR  is 1 to 1 in mapping transformations...
    Thanks In advance

    Hi all,
    Thank you for all your replies...
    But i need those spcial char's  in the CUBE ,because my Customer wants to see those values in the report level...
    If i select thaose special  char and put it in RSKC..my problem will not resolve...because like that we have somany for example :
    Ë°ÎñŽúÀí·Ñ       
    u0153áת±u0178Ô³ö¿Ú12%Ë°
    u0153áת±u0178ÔÂÏúÏîË°u0153ð 
    u0153áת±u0178ÔÂÏúÏîË°u0153ð 
    ºu0152²£ÍÁµØʹÓ÷Ѡ  
    ŽÖÉŽÊֲᲹ˰     
    ¹úÄÚÔËÊä±£·Ñ     
    Ôu20ACÌá¹úÄÚÔË·Ñ     
    u0152ÆÌá±u0178Ô³ö¿ÚÔË·Ñ 
    ÍÁµØʹÓÃË°       
    u0152u0152Êõ·þÎñ·Ñ   PL  
    09.1.1-6.30ѧ·Ñ  
    help me out...
    Thanks in advance...

  • Attachment having Umlaut or special chars are shown as =2Epdf?=

    Very often I receive Mails containing attachments that look like this:
    =?utf-8?Q?Assetplanung_=E2=80=9ECelebrity-2007-09=E2=80=9C=2Epdf?=
    They all have in common that the names of the attachment contain umlauts like ÖÄÜ or special chars like ".
    Every other mail client I tried, like entourage, thunderbird, our kerio webmail applicaton shows the attachment in the right way, but mail fails miserably.
    It does not matter to send the mail as a windows attachment or to choose any other format like plain text or so.
    As I have learned this problem has nothing to do with html formatting but is caused by something called quoted-printable...
    Any help for this one anywhere?
    regards
    Oliver

    As noone seems to have a clue, I try to solve it on my own.
    The current mailversion is lame and poor and is the cause for this problem.
    The following things have to come together to reproduce this problem.
    A mail needs an attachment its name must contain special chars like äöü or something like " and its name must exceed 32 letters including its file extension.
    Bang, you receive a mail with a garbeld attachments like mentioned in the message above.
    The 10.5 Mailversion seems to be fixed, all previous versions contain this bug. Entourage does not have it, Thunderbird does not have it, not one serious mail application has this bug. Please note this: I mentioned Entourage and serious in one sentence... But even this app is better..
    regards
    Oliver

  • Connection String Special char

    Hello,
    I have a problem with databasenames with special characters in the name:
    (My code works when there is not a special char in the name)
    For example, when my connectionstring would be:  jdbc:sybase:Tds:localhost:2638?ServiceName=BANDENM&W
    I get a java.sql.SQLException: JZ00L: Login failed.  Examine the SQLWarnings chained to this exception for the reason(s). at line 3 while my pasw and login are correct.
    Class.forName("com.sybase.jdbc3.jdbc.SybDriver");
      String connectionString = "jdbc:sybase:Tds:" + config.getHost() + ":" + config.getPort() + "?ServiceName=" + databaseName;
      Connection connection2  = DriverManager.getConnection(connectionString, config.getUser(), config.getPassword());
      //get VC client customer info
      statement = connection2.createStatement();
      resultSet2 = statement.executeQuery("SELECT CNR_SUPP,CNR_CUST,TNR_ID,NM_ID,CNR_VAT_ID,NM_FILTER_ID,CNR_ZIP_ID,CNR_VATCNTRY_ID,NM_TOWN_ID,TOP_COUNTRY.CNR_INTRASTAT FROM TOP_IDENTITY JOIN TOP_COUNTRY ON (TOP_IDENTITY.COD_CNTRY_ID = TOP_COUNTRY.COD_CNTRY)");
    When I add double quotes around the databaseName, I get to line 8 but then I get an error:
    com.sybase.jdbc3.jdbc.SybSQLException: ASA Error -141: Table 'TOP_IDENTITY' not found
    But the table is again, definitely there ...
    I've tried escaping it by replacing & with &amp;
    But no luck.

    1) What version and build are you running for jConnect and SQL Anywhere?
    I’ve used jconn2 and jconn3, for the moment I’m using 3
    SQL Anywhere = 9.0.2.3198 on my developer system
    2) Can you post the output from dbinfo for the database that you testing?
    I'm assuming you mean this:
    Adaptive Server Anywhere Database Engine Version 9.0.2.3198
    Copyright © 1989-2004 Sybase, Inc.
    Portions Copyright © 2002-2004, iAnywhere Solutions, Inc.
    All rights reserved. All unpublished rights reserved.
    This software contains confidential and trade secret information of
    iAnywhere Solutions, Inc.
    Use, duplication or disclosure of the software and documentation
    by the U.S. Government is subject to restrictions set forth in a license
    agreement between the Government and iAnywhere Solutions, Inc. or
    other written agreement specifying the Government's rights to use the
    software and any applicable FAR provisions, for example, FAR 52.227-19.
    iAnywhere Solutions, Inc., One Sybase Drive, Dublin, CA 94568, USA
    4 logical processor(s) on 1 physical processor(s) detected.
    Running on Windows NT 6.1 Build 7601 Service Pack 1
    21688K of memory used for caching
    Minimum cache size: 2048K, maximum cache size: 262144K
    Using a maximum page size of 8192 bytes
    Database server started at Wed Aug 27 2014 14:18
    Trying to start SharedMemory link ...
        SharedMemory link started successfully
    Trying to start NamedPipes link ...
        NamedPipes link started successfully
    Trying to start TDS (TCPIP) link ...
    Starting on port 2638
        TDS (TCPIP) link started successfully
    Now accepting requests
    Starting database "TOPADMINSA9" (W:\TOP\DATA\TOPADMINSA9.db) at Wed Aug 27 2014 14:18
    Transaction log: TOPADMINSA9.log
    Starting checkpoint of "TOPADMINSA9" (TOPADMINSA9.db) at Wed Aug 27 2014 14:18
    Finished checkpoint of "TOPADMINSA9" (TOPADMINSA9.db) at Wed Aug 27 2014 14:18
    Database "TOPADMINSA9" (TOPADMINSA9.db) started at Wed Aug 27 2014 14:18
    Starting database "3051" (w:\TOP\DATA\3051\3051.DB) at Wed Aug 27 2014 14:18
    Starting checkpoint of "3051" (3051.DB) at Wed Aug 27 2014 14:18
    Finished checkpoint of "3051" (3051.DB) at Wed Aug 27 2014 14:18
    Database "3051" (3051.DB) started at Wed Aug 27 2014 14:18
    Starting database "BANDENM&W" (w:\TOP\DATA\BANDENM&W\BANDENM&W.DB) at Wed Aug 27 2014 14:19
    Database "3051" (3051.DB) stopped at Wed Aug 27 2014 14:19
    Starting checkpoint of "BANDENM&W" (BANDENM&W.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "BANDENM&W" (BANDENM&W.DB) at Wed Aug 27 2014 14:19
    Database "BANDENM&W" (BANDENM&W.DB) started at Wed Aug 27 2014 14:19
    Starting database "BRAL" (w:\TOP\DATA\BRAL\BRAL.DB) at Wed Aug 27 2014 14:19
    Transaction log: w:\TOP\DATA\BRAL\BRAL.log
    Starting checkpoint of "BRAL" (BRAL.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "BRAL" (BRAL.DB) at Wed Aug 27 2014 14:19
    Database "BRAL" (BRAL.DB) started at Wed Aug 27 2014 14:19
    Starting checkpoint of "BRAL" (BRAL.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "BRAL" (BRAL.DB) at Wed Aug 27 2014 14:19
    Database "BRAL" (BRAL.DB) stopped at Wed Aug 27 2014 14:19
    Starting database "HARKELIJN" (w:\TOP\DATA\HARKELIJN\HARKELIJN.DB) at Wed Aug 27 2014 14:19
    Transaction log: w:\TOP\DATA\HARKELIJN\HARKELIJN.log
    Starting checkpoint of "HARKELIJN" (HARKELIJN.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "HARKELIJN" (HARKELIJN.DB) at Wed Aug 27 2014 14:19
    Database "HARKELIJN" (HARKELIJN.DB) started at Wed Aug 27 2014 14:19
    Starting checkpoint of "HARKELIJN" (HARKELIJN.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "HARKELIJN" (HARKELIJN.DB) at Wed Aug 27 2014 14:19
    Starting database "BURO56" (w:\TOP\DATA\BURO56\BURO56.DB) at Wed Aug 27 2014 14:19
    Database "HARKELIJN" (HARKELIJN.DB) stopped at Wed Aug 27 2014 14:19
    Transaction log: w:\TOP\DATA\BURO56\BURO56.log
    Starting checkpoint of "BURO56" (BURO56.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "BURO56" (BURO56.DB) at Wed Aug 27 2014 14:19
    Database "BURO56" (BURO56.DB) started at Wed Aug 27 2014 14:19
    Starting checkpoint of "BURO56" (BURO56.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "BURO56" (BURO56.DB) at Wed Aug 27 2014 14:19
    Database "BURO56" (BURO56.DB) stopped at Wed Aug 27 2014 14:19
    Starting database "ENOZEN" (w:\TOP\DATA\ENOZEN\ENOZEN.DB) at Wed Aug 27 2014 14:19
    Transaction log: w:\TOP\DATA\ENOZEN\ENOZEN.log
    Starting checkpoint of "ENOZEN" (ENOZEN.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "ENOZEN" (ENOZEN.DB) at Wed Aug 27 2014 14:19
    Database "ENOZEN" (ENOZEN.DB) started at Wed Aug 27 2014 14:19
    Starting checkpoint of "ENOZEN" (ENOZEN.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "ENOZEN" (ENOZEN.DB) at Wed Aug 27 2014 14:19
    Database "ENOZEN" (ENOZEN.DB) stopped at Wed Aug 27 2014 14:19
    Starting database "ENOCONBVBA" (W:\TOP\DATA\ENOCONBVBA\ENOCONBVBA.DB) at Wed Aug 27 2014 14:19
    Transaction log: W:\TOP\DATA\ENOCONBVBA\ENOCONBVBA.LOG
    Starting checkpoint of "ENOCONBVBA" (ENOCONBVBA.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "ENOCONBVBA" (ENOCONBVBA.DB) at Wed Aug 27 2014 14:19
    Database "ENOCONBVBA" (ENOCONBVBA.DB) started at Wed Aug 27 2014 14:19
    Starting checkpoint of "ENOCONBVBA" (ENOCONBVBA.DB) at Wed Aug 27 2014 14:19
    Finished checkpoint of "ENOCONBVBA" (ENOCONBVBA.DB) at Wed Aug 27 2014 14:19
    Database "ENOCONBVBA" (ENOCONBVBA.DB) stopped at Wed Aug 27 2014 14:19
    3) Can you run the following queries within the application that you are seeing this behavior and provide the results:
      Q1:
         select  user_name,  table_name
              from  systable join sysuser
         where
               table_name in ('TOP_IDENTITY','TOP_COUNTRY')
    27-08-14 14:23:30 [ERROR] TechLogger -  -> com.sybase.jdbc3.jdbc.SybSQLException: ASA Error -141: Table 'sysuser' not found
    Q2:
         select current user from dummy;
    resultSet2.getString("current user")" = DBA

  • Ftp  and special chars

    I have a site which is user generated, and some of the files
    that people upload contain special chars for example 'my*pic.jpg'
    ... I am trying to backup my server with dreamweaver ftp, however
    it wont let me download files with chars like * in their names...
    is there any way to override this in dreamweaver? thanks to any
    responders.

    .oO(jonnybennett)
    >I have a site which is user generated, and some of the
    files that people upload
    >contain special chars for example 'my*pic.jpg' ...
    Uh, this would be an invalid filename on most filesystems.
    The asterisk
    is usually a wildcard character.
    >I am trying to backup my
    >server with dreamweaver ftp, however it wont let me
    download files with chars
    >like * in their names...
    Such files shouldn't exist at all. How were they uploaded?
    Micha

  • Getting parameters from URL: use of Special Chars

    I'm unable to retrieve the Special Chars from URL parameters.  Does someone have an idea where to look for?
    Examples where no Special Chars is retrieved :
    ...App?param=Aménagement
    ...App?param=Am<é>nagement
    ...App?param=Am%E9nagement
    I'm using this code :
              IWDProtocolAdapter protocolAdapter =
                   WDProtocolAdapter.getProtocolAdapter();
              IWDRequest request = protocolAdapter.getRequestObject();
                                    String param = request.getParameter("param");
    Thanks!

    okay, So if I use :
    ...App?param=Am%E9+nagement
    How would you then integrate URLDecoder.decode in the following code?
    IWDProtocolAdapter protocolAdapter =
         WDProtocolAdapter.getProtocolAdapter();
    IWDRequest request = protocolAdapter.getRequestObject();
    String param = request.getParameter("param");

  • Dealing with MS Word special chars

    Hi,
    Is there a java.String method (or similar) which will replace MS Word special chars - such as "culry apostrophes" - with HTML compliant versions?
    cheers
    Hugh
    Edited by: inabind on Aug 11, 2008 7:39 AM

    Yes. Oddly enough their names start with "replace".
    But you don't necessarily need to convert the left curly quote to &#2017; or whatever it converts to. You could also use UTF-8 as your HTML's encoding and just leave that character as is.

  • How can I Retrieve special chars from a HTTP Request??

    Hi,
    I want to retrieve special chars from a request
    Chars like accents used in spanish languages or symbols?
    Is there any way to do it
    Thanks in advance
    Alejandro Arredondo

    This is my problem
    For example:
    This is my form:
    <form>
    <input type="text" name="test">
    </form>
    I do write a char on the text area. Something like "?" or "?"
    or some words with accents
    When I retrieve the value with
    String value = request.getParameter("test");
    and print it
    out.println("TEST= " + test);
    It prints another symbol that isn't the one I sent in my form.
    why?
    Thanks

  • Page encoding / charset / special chars / NON-ASCII chars

    Whenever special characters are used in our environment, the data is stored incorrect ...
    ® gets converted to ®
    and other special chars gets converted to other special chars ... the strange thing is that some inputText fields in some pages work just fine ..chars dont get converted and it happend in some other many pages ...not sure whats going on ..I tried to change the charset or the pageEncoding of the pages or even manually using the setPageEncoding in the reequest and in the response ..with no luck ...when I print the request params ..the values are converted, so ma not sure at what stage the string get converted and how to prevent it ...
    Charset of the jsp-page is UTF-8. Need help here please.
    Thanks.

    You must verify that all resources are in UTF-8. There are a couple of places you have to check:
    Compiler encoding
    Embedded OC4J JSP Compiler options
    Project settings
    After that it worked for me.
    Timo

  • RDF Report Output Got Displayed in Special Chars

    Team,
    RDF report output is getting displayed in special chars.
    when i query the data from SQL Developer, the data is displayed fine.
    But when the data is displayed in the report the characters(single quotes, double quotes) are not displayed properly, they are displayed in a special char.
    why it is happening so . Is it related any font missing ? Plz do let me know.
    thanks
    sridhar

    (single quotes, double quotes) These are probably not really single and double quotes. Check the ASCII value.
    drop table ttest;
    create table ttest (col1 varchar2(10));
    insert into ttest values ('''Quote''');
    insert into ttest values ('"Quote"');
    select * from ttest;
    select dump(col1) from ttest;
    Table dropped.
    Table created.
    1 row created.
    1 row created.
    COL1     
    'Quote'  
    "Quote"  
    2 rows selected.
    DUMP(COL1)                                                                     
    Typ=1 Len=7: 39,81,117,111,116,101,39                                          
    Typ=1 Len=7: 34,81,117,111,116,101,34                                          
    2 rows selected.

Maybe you are looking for

  • Macbook Pro to TV

    I've been trying to hook up my Macbook Pro to the TV monitor with an HDMI chord and a mini displaport converter. It works with my roommates' Macbook Pros but not with mine, why is that?

  • Inserting row in ALV

    hi  experts .. I want to add a row in the alv when i click on add button.. I know there is insert row and append row buttons available in alv but i dont want those names .. Can i change the name of standard buttons or is there sm class that i can use

  • Down payments in Liquidity forecast

    Dear collegues, I'm searching for a way to include downpayments in the liquidity forecast (tx FF7B), but the system don't allow so as this kind of Special GL indicators are considered as incoming payments, so when I'm trying to post one under tx. F-2

  • Why can't I comment on an open thead?

    I was trying to comment on an open thread but I keep getting an error. I've cleared cookies, etc. This is the thread: https://support.mozilla.org/en-US/questions/1048978?fpa=1#answer-preview I keep getting this message: "Oh, no! It looks like an unex

  • Data cancellation / roll back

    Hi, We have a scenario wherein SAP PI posts certain number say 10 Material Master Data to SAP from external system, so during process if first five materials out of 10 are posted and error appears for sixth material, then is it possible to cancel all