File XML Content Conversion: Problem with special characters

Hello,
in a file sender cc content conversion is used to transform a flat structure to XML. What we experiencecd is that the message mapping failed due to a character that was not allowed in XML:
I was assuming that the file content conversion just creates XML messages with allowed characters. Is there any way to configure content conversion to remove control characters which are not allowed in XML? Unfortunately the sender system cannot be modified.
Thank you.

Hi Florian,
  Please use this UDF to remove special characters which prevent XML messages to form properly.
public static String removeSpecialChar(String s)
          try
               s=s.replaceAll("&","& amp ;");
               s=s.replaceAll("<"  , "  & lt ;");
               s=s.replaceAll(">", "& gt ;");
               s=s.replaceAll("'", "& apos ;");
               s=s.replaceAll("\"", "& quot ;");
          catch(Exception e)
               e.printStackTrace();
          return s;
Please remove spaces between characters within double quotes. I have added them because otherwise you can't see this code properly. Please check this below link , please replace the characters with proper values as the display is causing a problem here   
http://support.microsoft.com/kb/316063
regards
Anupam
Edited by: anupamsap on Jul 7, 2011 4:22 PM
Edited by: anupamsap on Jul 7, 2011 4:23 PM

Similar Messages

  • XML to PCL: Problem with special characters, entity referenceses, etc.

    I (an XML beginner) am trying to produce PCL (escape sequences, you know) documents from XML using the PL/SQL parser and I'm having the following problems:
    1. I need the escape character either in the XSL file, or in the XML, but this results in the error:
    Error occurred while parsing: Invalid char in text.
    2. I also need the character &. I tried to use the entity reference for & but the result was that it's converted to ampersand-#-38; (without the hyphens, of course) in the parsed file.
    3. I have to use characters from the German alphabet (umlauts) but it seems that I'm not the only one who doesn't like them! I tried changing the encoding (ISO-8859-1 or -2) in my XSL file but the error is always:
    Error occurred while parsing: 6-byte UTF8 encoding not supported.
    How can I get all these characters in the result file?
    Thanks for any info on the subject!

    I am having this same trouble. I want to have an XML document that has ISO-8859-1 encoding that contains an (ampersand)amp; character entity. When I apply XSL to this, I want the (ampersand)amp; entity to remain intact. Instead it is converted to (ampersand)#38; Please let me know if you find an answer to this problem. [email protected]
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Penn ([email protected]):
    I (an XML beginner) am trying to produce PCL (escape sequences, you know) documents from XML using the PL/SQL parser and I'm having the following problems:
    1. I need the escape character either in the XSL file, or in the XML, but this results in the error:
    Error occurred while parsing: Invalid char in text.
    2. I also need the character &. I tried to use the entity reference for & but the result was that it's converted to ampersand-#-38; (without the hyphens, of course) in the parsed file.
    3. I have to use characters from the German alphabet (umlauts) but it seems that I'm not the only one who doesn't like them! I tried changing the encoding (ISO-8859-1 or -2) in my XSL file but the error is always:
    Error occurred while parsing: 6-byte UTF8 encoding not supported.
    How can I get all these characters in the result file?
    Thanks for any info on the subject!<HR></BLOCKQUOTE>
    null

  • Problems with special characters like "u00F6" "u00E4" "u00FC"

    Hi,
    we currently face some major problems with special characters like "ö" "ä" "ü". First I thought it is a SP02 specific problem but it still doesn't work with SP03.
    When I start an import the import manager shows correct converted value. "ö"s "ä"s "ü"s are displayed correctly. But after I've done the import I look into the Data manager and I see instead of these characters charcaters like "&#776;". (note: the character should show a little square box - but the forum cannot desplay it)
    How can I solve this problem?
    Regards
    Nico

    Hi Nico
      Just try it out the following steps, hope it solves ur issue.
    <b>To set one or more values back to their original values:</b>
    1. In the Import Manager Source Values grid, select the values that you want to set back to their original values.
    2. Right-click on one of the values and choose Set to Original Value from the context menu, or choose Values > Apply Value Conversion Filter > Set to Original Value from the main menu.
    3. MDME sets each value back to its original value, which appears in black in the Source Values grid.
    <b>NOTE : You can use the Set to Original Value filter only at the value-level and not at the field level.</b>
    thanks
    Alexander

  • Problems with special characters in InputStream or XPath

    Hello everyone,
    I am having problems with special characters such as ", ', - and so on, everything becomes ? (questionmark). (Not with special nordic characthers (å,æ,ø) though.)
    The encoding of the XML is UTF-8, and the server that holds the webservice is setting encoding to UTF-8 also, so no conflict there.
    What I have done is something like this:
    {code}
    String url = "http://www.formula1.com/rss/news/latest.rss"; // This is not the feed I use, it is a custom XML document
    InputSource is = new InputSource(url);
    DocumentBuilderFactory fct = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = fct.newDocumentBuilder();
    Document doc = builder.parse(is);
    Element rootElement = doc.getDocumentElement();
    XPathFactory factory = XPathFactory.newInstance();
    XPath xPath = factory.newXPath();
    out.print(xPath.evaluate("/rss/channel/title", rootElement)); // The xml is not a RSS feed, this is just an example.
    {code}
    Please let me know what I am doing wrong, or give me a hint of how to solve this in another way.
    Best regards,
    G.Hansen
    Edited by: G.Hansen on Mar 24, 2009 2:39 AM

    Hello, thanks for you reply. I had to rewrite your code a little, and I think that your code would not really compile, if you tried yourself :-)
    I ended up with something like this:
    our environment is running in 1.4 mode, so I could not use the for-each loop :-(
    public String printEntities(String s) {
         char[] sArray = s.toCharArray();
         StringBuffer sb = new StringBuffer();
           for (int i = 0; i < sArray.length; i++) {
             if (sArray[i] > 256)
                  sb.append("&#x" + Integer.toHexString(sArray) + ";");
         } else
              sb.append(sArray[i]);
         return sb.toString();

  • Problems with special characters with XML/PDF printing

    Hi,
    Our setup:
    Apex Listener 2.0.5
    Oracle DB 11G
    Weblogic
    Apex 4.2.2
    Various recent major browsers
    We used this blog post so we could do some PDF printing with APEX Listener:
    http://marcsewtz.blogspot.be/2013/04/pdf-printing-with-oracle-application.html
    The problem is special characters. For example the "&" sign comes out as "%26amp;" when we export an XML.
    Could anyone provide some insights of what we can do to fix this?
    Regards,
    Joni

    This is a known bug.
    https://support.oracle.com/epmos/faces/BugDisplay?_afrLoop=957905848396285&id=18282188&_afrWindowMode=0&_adf.ctrl-state=168vq5zhn3_233
    The bug 18282188 has been fixed in Apex 4.2.5 version.
    Upgrade the Apex version to 4.2.5 when it is available.

  • Problem with special characteres

    Hi. I have a problem with java. I�m making an application that works with special characters and displays correctly on my local machine, as I use escape characters such as &igrave; for �. The problem is when I deploy the application on a unix machine. All of the special characters (�, �, �, etc) appear like a �?� (question mark). Any tips, please?
    Thanks in advance

    Andy2008 wrote:
    Hi. I have a problem with java. I&#146;m making an application that works with special characters and displays correctly on my local machine, as I use escape characters such as &igrave; for �. The problem is when I deploy the application on a unix machine. All of the special characters (&#145;, �, �, etc) appear like a &#147;?&#148; (question mark). Any tips, please?First step: read [this excellent introduction into Unicode|http://www.joelonsoftware.com/articles/Unicode.html], it will give you the basics you need to solve this problem.
    How do you input and output those characters? Simply print them to the console? Or write them to a HTML file (since you mention &<something>; notation)?
    "?" is normally the result when you convert a String (which is always in UTF-16 encoding in Java) to an encoding that can't represent your characters (ASCII for example).

  • Problems with special characters in JSP app

    Hello!
    I am working for a JSP application which uses special characters.
    The database used is a Novell MySQL version, it is fine.
    I use Tomcat, Apache.
    I do not think that the versions are important.
    ON NT:
    The application works fine with special characters.
    Obs: I tried only with Tomcat; I didn't use Apache.
    ON NOVELL:
    If I try to insert some special characters,
    they arrive just fine into the database.
    The problem is when I want to display them.
    I tried with jsp directive to set the charset,
    or with HTML meta tag - no result al all.
    Everytime I use the same work station, and the same browser to do the tests.
    Please help with any ideas.
    Another question, maybe relayed:
    Can I set Tomcat so that when it creates the servlets it uses a custom charset I can indicate?
    THANK YOU!

    The characters I want to use are french characters, e-acute, etc.
    I take the data with request.getParameter, POST method, etc.

  • SMARTFORM problems with special characters

    Hi everybody,
    only to know if somebody knows how to fix a problem printing special characters in a smartform, instead of some characters the smartform display (Print preview)  and prints interrogative symbols <b>"?"</b>.
    If someone knows about this problem, it will be helpfully for me,
    thanks and have a good day

    HI
    To display Special characters in Smartforms ...
    goto text editor of the perticular text node.
    in the text editor, Click INSERT - Characters - Displayable Characters.
    a new window will open showing all characters...if ur required character is not
    present, click on non-dispalyble character button , it displays all the characters
    and their respective numbers...select ur required character .
    Check it, if it is helpfull reward points..
    Thanks
    REGARDS
    DINESH

  • Problems with Special Characters on Exchange Email

    Hello:
    People I have a issue with our Corporate Email on my Iphone. We use Exchange 2003 and we have users with special characters on his emails address.
    I receive fine the email, just appear a errors on the display name. The issue is when I try to reply thie email. A error message popup said:
    Invalid Address
    "email with special characters" does not appear to be a valid email address. Do you want to send it anyway?
    If I press Yes, Iphone try to send the message But I receive another error message:
    Cannot send Mail
    An error ocurred while delivering this message.
    Any Help or Idea?
    Here My Email Configuration
    Email = Email
    Server = Server IP
    Domain = Work Domain Name
    Username = my user id
    Password = my password
    Description = Work
    Use SSL = ON
    S/Mime = Off

    When I Said "we have users with special characters on his emails address" its mean users with ñ,ó, ú, Ñ on his emails address. 
    When I said "just appear a errors on the display name" I mean characters like Âñ¡
    Thanks

  • Problem with specials characters like '€' or 'œ'

    Hello,
    I'm having troubles with specials characters such as '€' or 'œ'.
    I use an application connected to a 9.2.0.7.0 database on a w2003 server.
    Characterset of the database is FRENCH_FRANCE.WE8MSWIN1252.
    In my workstation the value of [HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG] is also FRENCH_FRANCE.WE8MSWIN1252.
    But when I type such specials characters through the application, they are replaced by '¿' in the database. The datatype of this column is varchar2.
    Can anyone help me ?
    thanks
    Antoine
    Edited by: Antoine.M on Aug 19, 2009 12:45 PM

    Is your application a java application ? if so, pl see MOS Doc 365874.1 (Euro Symbol/Trademark Symbol is Garbled When JDBC Thin Driver Retrieves Data from a Database with Characterset WE8MSWIN1252)
    HTH
    Srini

  • File Content Conversion (receiver) and special characters

    Hi all,
    I have a scenario that has a file receiver channel with content conversion. The record structure in the flat file is field-width delimited (hence no field separator) and the parameter 'fieldLengthTooShortHandling' has the value 'Cut' because the receiving system needs only specific widths for the fields. Hence if the field value exceeds the length permitted, the extra characters are clipped.
    I observed that some characters are not handled properly while creating the text file. For example, one of the fields contained a "minus" character (not the hyphen). The flat file was created successfully. I opened the file in notepad and found that the "minus" character has appeared correctly and the column count in that record was as expected. However when the same file was opened in Textpad, the minus character was displayed as â | |  ('a' with caret, bar, bar) So, all the fields after this field were shifted ahead by 2 characters and hence the total column count of the record had gone beyond the actual one.
    All this started due to the error reported by the receiver system which processes the flat file. Due to shift of characters in the flat file, the processing failed. Moreover that system cannot process the special characters (like minus or non-Latin accented characters etc.) So although there is no issue in XI interface as such, I just want to know if anyone has more informtion on why the characters are displayed differently as mentioned above.
    Regards,
    Shankar

    Define data type like
    order_recordset
    order_row 1..unbound
    f1
    f2
    All are same except communication channel configuration,
    Message Protcol : File content select, then below you got additional parameters.
    there you fill
    Document name : Your sender message type.
    Document namespace : Give your scenario namespace
    Recordset name : order_recordset ( mentioned in the data type)
    Recordset structure : order_row, *
    Name Value
    order_recordset.fieldSeparator : 'nl'
    order_row.fieldSeparator : ,
    order_row.endSeparator : 'nl'
    based on your text file you fill the above parameter values.

  • Problem with special characters loaded from XML

    I have an XML whose elements contain special characters (for example: ñ, Ñ, á, Á, etc..), When I load the XML and make a Trace () the loaded element, I see that it is loaded correctly, but then in the text field is not special characters. For example in the XML I have the text Baños, but in the text field shown Baos.
    It is clear that in the text field are incorporated upper case, lower case, numerals, punctuation symbols and Basic Latin.
    I also tested with the judgment System.useCodePage = true in the code but does not work.
    Thanks for any help you can give me.
    Garchabig.
    PD: Sorry for poor English, I'm Latino. -

    Hi, before reading your answer I tried embedding all characters and surprise surprise, it worked!
    So then I was testing with embedded characters to see what was the need to display special characters (like "ñ", "í", etc..) and discovered that it has to be built or yes is Latin I (194/388 glyphs).
    Thank you very much also for the answer.
    Greetings, Garchabig. -

  • Problems with special Characters in filenames and folders

    My problem is that i have a small portlet which lists some files under each other. These files have sometimes the special character & in there name.
    If now a person clicks with right mousebutton on such a link, the saving dialog only shows a cryptik filename.
    Example:
    filename = harry&sally.pdf
    rightclick and saving the file the new name is something like: 2C576B9904F63BBEE040200A2A040606.pdf
    All other files even if they have blank characters or characters like ä, ö ... it works but not with &.
    Do anyone could say me how i can manage this?
    Message was edited by:
    Oliver Lemm

    having special characters in filenames is not a safe and healthy practice as you may see. this is specially true for the content that has to be displayed online using Oracle as Oracle uses <b>&</b> and <b>?</b> for passing parameter values in dynamic URLs. </p>
    <p>
    I would recommend estimation of the cost of fixing filenames to tackle this issue rather than to get a way-around to just bury it again. if you are using Unix platform, it should not be more than a line worth of command to fix for all such files using stream-editors; in windows you may take some more. but i understand, changing filenames might require one to see the impact of those changes on all other places where these files have been called. </p>
    <p>
    with kind regards,
    <br>
    syed

  • Unmarshalling problem with special characters (Trademark, French

    I'm using a DefaultHandler class to create a StringBuffer which contains a single (though very complex) element from an XML file. I am unmarshalling this StringBuffer object to a JAXBContext like this:
    u.unmarshal( new StreamSource( new StringReader( sb.toString() ) )
    My special characters are going way out of whack (please read (TM) as the Trademark symbol)
    T-Force(TM) Ring(TM) Bonded iron construction for durability and longer life
    becomes
    T-Force���Ring ��� Bonded iron construction for durability and longer life
    Before I put anything else into the StringBuffer I put this in:
    sb.append("<?xml version=\"1.0\" encoding=\"iso-8859-15\"?>");
    But I've tried:
    sb.append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
    and
    sb.append("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>");
    with different, but wrong, results.
    It's true that I'm viewing these results on a web page, so it's possible that the problem is occurring on the back end once I persist the data, but it looks like my database is set for UTF-8 (that's what I put for this new installation of Oracle 9i R2).
    Is there something basic I am missing. Like, perhaps, I need to do some sort of XML entity coding?
    Thank you very much for any help you can offer.

    Actually I had forgotten one additional thing. I have
    tried testing one thing at a time, and I have sent the
    special characters to the log file with logger.debug
    statements (log4j). The characters are screwed up in
    the log files, which is what makes me think I need to
    do some sort of entity encoding. (?)I don't think that log4j provides any way to declare the encoding it uses for your files. My guess is that it's using the default encoding for your system, which could be a problem for things like the trademark character. So log4j really gives you just another thing to test, rather than acting as a testing tool.
    I was thinking of a more low-level test, where you take your trademark character, which is 2022 or some such number (check the Unicode charts) and you write it to the database and read it back. Do you get the same character back? That sort of testing.

  • Problem with special characters when calling web services via ISG

    Hi all,
    I have a problem when trying to send or retrieve strings containing some special characters via Integrated SOA Gateway.
    For example, when I call a PL/SQL function via ISG that returns a string containing curling single and double quote characters, these are not represented by valid XML character entity references. So when trying to open the response XML (returned by ISG) in a browser, I get a parser error...
    Has anybody had a similar experience with ISG? How can I resolve that - is it an ISG bug?
    Thanks
    Carolin

    XML Parsing Error: not well-formed
    Location: file:///C:/Users/sanders/Desktop/Text3.xml
    Line Number 4734, Column 54: <DESCRIPTION>Overhead Track Lighting 4?</DESCRIPTION>Do you get the same error if you change the description from "Overhead Track Lighting 4?" to "Overhead Track Lighting 4"?
    Do you have any invalid characters?
    BI Publisher Reports End With Error When There Is An Ampersand Character ( & ) On The Xml Data File [ID 1081175.1]
    Journal Entries Report Doesn'T Yield Output: Java Heap Error [ID 1115663.1]
    Thanks,
    Hussein

Maybe you are looking for