Character Conversion

Hi,
Am loading from a flat file. The data for a particular field includes french characters like ç,è, etc.
I tried writing a routine in the start routine of the transfer rules.
But when it reads the data itself from the file it reads the french character as a #.
Can anyone please suggest a solution.
Thanks.

hi Tessy,
the table name is RSALLOWEDCHAR, but you can use function module (SE37) RSKC_ALLOWED_CHAR_GET to display the characters allowed.
to maintain RSKC, click watch/execute icon (not save icon) will save the setting
check Eugene's weblog
/people/sap.user72/blog/2006/07/23/invalid-characters-in-sap-bw-3x-myths-and-reality-part-2
/people/sap.user72/blog/2006/07/08/invalid-characters-in-sap-bw-3x-myths-and-reality-part-1
golden rules mentioned
- use ‘ALL_CAPITAL’ option in RSKC
- lower case -> TRANSLATE RESULT TO UPPER CASE
- forbidden characters -> use routine
hope this helps.

Similar Messages

  • Printing ZPL (Zebra) data to printer spooler without character conversion

    Hi all,
    We are printing shipping labels from UPS, with a process where we recive the ZPL label code directly from UPS, and we just need to pass the data to the printer to get the labels. We have already implemented this with Fedex and some custom labels, and it works perfectly. The problem with the UPS label data is that it contains non-printable characters (in the MaxiCode data field). When passed to the SAP printer spooler (see code example below), the data gets corrupted because SAP interprets these non-printable characters as printer control codes.
    I have verified this by saving the ZPL data to a local file, before printing it through the SAP spooler. I then print this raw data and compare the output with the labels printed from the spooler. The MaxiCode (the big 2D barcode) is different in these labels. UPS has also tested the labels, and rejected them because of incorrect data in the barcode.
    For printing, we are using printers defined as type "PLAIN", but I also tried using the "LZEB2" device type with the same result. The error we see in the spooler entry is this:
    Print ctrl S_0D_ is not defined for this printer. Page 1, line 2, col. 2201
    Print output may not be as intended
    The printer ctrl code differs, depending om the label. I have examined the spooler data in "raw" mode, and there is always an ASCII character 28 (hex 1C) in front of the characters that SAP think are control codes, and this is why I think these non-printable characters are the reason for the problems.
    This is the function module I use to print the ZPL data (and as stated above, this works fine for Fedex and custom labels). The ZPL data is converted to binary format before passed to the function module, but I also tried to send the data in text format with another FM, but the result is the same. I have experimented with the "codepage" parameter, and this one gives the least amount of errors, and some labels actually get through without errors. But still at least 50% of the labels gets corrupted, with log entries like above.
    CALL FUNCTION 'RSPO_SR_WRITE_BINARY'
          EXPORTING
            handle           = lv_spool_handle
            data             = lv_label_line_bin
            length           = lv_len
            codepage         = '2010'
          EXCEPTIONS
            handle_not_valid = 1
            operation_failed = 2
            OTHERS           = 3.
    Does anyone know if there is a way to send data to the spooler without character conversion or interpretation of printer control codes? Or is there any other smart way to get around this problem?
    /Leif

    I do a more direct output to the spooler, to avoid any issues with the WRITE statement and SAP's report output processing. At the same time, I insert line breaks so that the output is easy to debug in the spooler if needed. Also included is the code to to detect the escape code (ASCII #28) and to insert a control code ZZUPS in its place (you can skip this for Fedex). Here's a simplified example, but please note this is for a Unicode system, some minor changes is required in a non-Unicode system.
    CONSTANTS: lc_spcode TYPE c LENGTH 5 VALUE 'ZZUPS',
               lc_xlen TYPE i VALUE 5.
       DATA: lv_print_params TYPE pri_params,
             lv_spool_handle TYPE sy-tabix,
             lv_name TYPE tsp01-rq0name,
             lv_spool_id TYPE rspoid,
             lv_crlf(2) TYPE c,
             lv_lf TYPE c,
             lstr_label_data TYPE zship_label_data_s,
             lv_label_line TYPE char512,
             lv_label_line_bin TYPE x LENGTH 1024,
             lv_len TYPE i,
             ltab_label_data_255 TYPE TABLE OF char512,
             ltab_label_data TYPE TABLE OF x,
             lv_c1 TYPE i,
             lv_c2 TYPE i,
             lv_cnt1 TYPE i,
             lv_cnt2 TYPE i,
             lv_x(2) TYPE x.
       FIELD-SYMBOLS: <n> TYPE x.
       lv_crlf = cl_abap_char_utilities=>cr_lf.
       lv_lf = lv_crlf+1(1).
       lv_name = 'ZPLLBL'.
    CALL FUNCTION 'RSPO_SR_OPEN'
         EXPORTING
           dest                   = i_dest
           name                   = lv_name
           prio                   = '5'
           immediate_print        = 'X'
           titleline              = i_title
           receiver               = sy-uname
    *      lifetime               = '0'
           doctype                = ''
         IMPORTING
           handle                 = lv_spool_handle
           spoolid                = lv_spool_id
         EXCEPTIONS
           device_missing         = 1
           name_twice             = 2
           no_such_device         = 3
           operation_failed       = 4
           OTHERS                 = 5.
       IF sy-subrc <> 0.
         RAISE spool_open_failed.
       ENDIF.
    LOOP AT i_label_data INTO lstr_label_data.
         CLEAR ltab_label_data_255.
         SPLIT lstr_label_data-label_data AT lv_lf INTO TABLE ltab_label_data_255.
         LOOP AT ltab_label_data_255 INTO lv_label_line.
           IF lv_label_line NE ''.
             lv_len = STRLEN( lv_label_line ).
    *       Convert character to hex type
             lv_c1 = 0.
             lv_c2 = 0.
             DO lv_len TIMES.
               ASSIGN lv_label_line+lv_c1(1) TO <n> CASTING.
               MOVE <n> TO lv_x.
               IF lv_x = 28.
                 lv_cnt1 = 0.
                 lv_label_line_bin+lv_c2(1) = lv_x.
                 lv_c2 = lv_c2 + 1.
                 DO lc_xlen TIMES.
                   ASSIGN lc_spcode+lv_cnt1(1) TO <n> CASTING.
                   MOVE <n> TO lv_x.
                   lv_cnt2 = lv_c2 + lv_cnt1.
                   lv_label_line_bin+lv_c2(2) = lv_x.
                   lv_c2 = lv_c2 + 2.
                   lv_cnt1 = lv_cnt1 + 1.
                   lv_len = lv_len + 1.
                 ENDDO.
               ELSE.
                 lv_label_line_bin+lv_c2(2) = lv_x.
                 lv_c2 = lv_c2 + 2.
               ENDIF.
               lv_c1 = lv_c1 + 1.
             ENDDO.
    *       Print binary data to spool
             lv_len = lv_len * 2. "Unicode is 2 bytes per character
             CALL FUNCTION 'RSPO_SR_WRITE_BINARY'
               EXPORTING
                 handle                 = lv_spool_handle
                 data                   = lv_label_line_bin
                 LENGTH                 = lv_len
               EXCEPTIONS
                 handle_not_valid       = 1
                 operation_failed       = 2
                 OTHERS                 = 3.
             IF sy-subrc <> 0.
               RAISE spool_write_failed.
             ENDIF.
           ENDIF.
         ENDLOOP.
       ENDLOOP.
       CALL FUNCTION 'RSPO_SR_CLOSE'
         EXPORTING
           handle = lv_spool_handle.
       IF sy-subrc <> 0.
         RAISE spool_close_failed.
       ENDIF.

  • Character conversion problems when calling FM via RFC from Unicode ECC 6.0?

    Hi all,
    I faced a Cyrillic character convertion problem while calling an RFC function from R/3 ECC 6.0 (initialized as Unicode system - c.p. 4103). My target system is R/3 4.6C with default c.p. 1500.
    The parameter I used in my FM interface in target system is of type CHAR10 (single-byte, obviously).
    I have defined rfc-connection (SM59) as an ABAP connection and further client/logon language/user/password are supplied.
    The problem I faced is, that Cyrillic symbols are transferred as '#' in the target system ('#' is set as default symbol in RFC-destination definition in case character convertion error is met).
    Checking convertions between c.p. 4103  and target c.p. 1500 in my source system using tools of transaction i18n shows no errors - means conversion passed O.K. It seems default character conversion executed by source system whithin the scope of RFC-destination definition is doing something wrong.
    Further, I played with MDMP & Unicode settings whithin the RFC-destination definition with no successful result - perhaps due to lack of documentation for how to set and manage these parameters.
    The question is: have someone any experience with any conversion between Unicode and non-Unicide systems via RFC-call (non-English target obligatory !!!), or can anyone share valuable information regarding this issue - what should be managed in the RFC-destination in order to get character conversion working? Is it acceptable to use any character parameter in the target function module interface at all?
    Many thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    Senior SAP ABAP Consultant

    hey,
    I had a similar experience. I was interfacing between 4.6 (RFC), PI and ECC 6.0 (ABAP Proxy). When data was passed from ECC to 4.6, RFC received them incorrectly. So i had to send trimmed strings from ECC and receive them as strings in RFC (esp for CURR and QUAN fields). Also the receiver communication channel in PI (between PI and  RFC) had to be set as Non unicode. This helped a bit. But still I am getting 2 issues, truncation of values and some additional digits !! But the above changes resolved unwanted characters problem like "<" and "#". You can find a related post in my id. Hope this info helps..

  • Error occurred during character conversion in SXMB_MONI

    Hello Experts,
    Good Day!
    I would like to seek your help here. When i used tcode SXMB_MONI to search for messages i get this error : Error occurred during character conversion.
    So far no problem with the program. Its work for all other dates. Just for one particular day and specific time period, im geting this error.
    Does anyone know what is this error means? Please reply..
    Thanks for your help.
    Looking forward for ur replies..

    Hi Presheela,
    Basically this problem occurs when ur payload contains any special characters like '&' ,'>'...etc .So you have to take care of how to deal with these characters in XI.
    Refer the following documentation:
    How to Work with Character Encodings in Process Integration
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79fb42
    Regards,
    Vinod.

  • Character conversion error

    Hi all,
    We are getting the following error when trying to parse an xml string resource - Character conversion error: "Illegal ASCII character, 0xc2" (line number may
    be too low)-. We have not been able to get around this. We have tried creating the InputSource two different ways:
    reader = new StringReader(stringSource);
    src = new InputSource( reader );
    and
    src = new InputSource(new InputStreamReader(new ByteArrayInputStream(stringSource.getBytes())));
    The problem does appear to go away if we treat the DTD we are validating against as a file. If we set it has a uri, we get the above problem.
    Is anyone else experiencing this problem?
    Any help would be greatly appreciated.
    Thanks in advance,
    Greg

    Hi,
    2 possible solutions:
    1) try using the xerces parser instead of sun's parser
    2) look at the posting at the following url and see wether the posted solution solves your problem: http://forums.java.sun.com/thread.jsp?forum=34&thread=67558
    Hope this helps,
    Kurt.

  • "character conversion error" while parsing xml files

    Hello,
    I'm trying to parse MusicXML (Recordare) files, but I'm getting an exception.
    I'm using the SAX parser (javax.xml.parsers.SAXParser).
    Here is the code I use to instantiate it:
    final javax.xml.parsers.SAXParserFactory saxParserFactory = javax.xml.parsers.SAXParserFactory.newInstance();
    final javax.xml.parsers.SAXParser saxParser = saxParserFactory.newSAXParser();
    final org.xml.sax.XMLReader parser = saxParser.getXMLReader();
    I'm using my own handler, but I get the same exception even if I use org.xml.sax.helpers.DefaultHandler.
    The error I get is:
    Character conversion error: "Illegal ASCII character, 0xc2" (line number may be too low).
    The first few lines of my xml files look like this:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE score-partwise
    PUBLIC "-//Recordare//DTD MusicXML 0.6 Partwise//EN"
    "http://www.musicxml.org/dtds/partwise.dtd">
    <score-partwise>
    [...etc...]
    If I delete the <!DOCTYPE ...> line, then I don't get the exception anymore. But the MusicXML files I get (from some other program) always contain this line, and it would be quite some work to delete them from every file manually.
    So does anyone know if there is a way to avoid deleting that line in every file, while still being able to parse the xml files without exceptions?
    Or maybe does anyone know what the exact cause of the exception is? (because I don't know what exactly causes it)
    Thank you in advance.
    Greetz,
    Jipo

    So does anyone know if there is a way to avoid
    deleting that line in every file, while still being
    able to parse the xml files without exceptions?ok this is side-stepping the real problem but I've used this code to filterout DTD references for other reasons   public static InputStream filterOutDTDRef(InputStream in) throws IOException {
          BufferedReader iniReader = new BufferedReader(new InputStreamReader(in));
          StringBuffer newXML = new StringBuffer();
          for(String line = iniReader.readLine(); line!=null; line = iniReader.readLine())
             newXML.append(line+"\n");
          in.close();
          int s = newXML.indexOf("<!DOCTYPE ");
          if(s!=-1)
             newXML.replace(s,newXML.indexOf(">",s)+1,"");
          return new ByteArrayInputStream(newXML.toString().getBytes());
       }and it actually speeds up the parsing phase too (since the DTD ref.s were on the web and the XML standard mandates that there is a fetch for each xml file parsed..)
    you can feed the above into the InputSource constructor that takes an InputStream argument.
    Now for the real problem... 0xc2 is "LATIN CAPITAL LETTER A WITH CIRCUMFLEX" according to a unicode chart - which is not an ASCII character (as the error message correctly reports). I'm not sure why the file is being parsed as ASCII though? You could try parsing in a FileReader to the inputsource and hope it picks up the default character encoding of your system, and that that character encoding matches the file. Or you could try passing in a FileReader constructed with a explicit character encoding (eg "UTF8") and see if that does the trick?
    asjf

  • Problem in the character conversion

    Hi Guys,
    I am facing problem in the character conversion
    I am posting data from SAP to third party system using XI , by converting whole input message to a String .I am using SOAP adapter to communicate XI to third party system.
    Thirdparty system needs String to be wrapped in CDATA so that it will not choke by looking at the special characters. I did Wrap the output string in CDATA, using ABAP mapping but when I do that XI is converitng  arrow brackets < and >. into &lt and u2018&gtu2019   my assumption is it is double encoding.
    example -
    before map -  <AppSystemInfo>
    after mapping  it is converted as -  <![CDATA[ &ltAppSystemInfo&gt]]>
    Edited by: Vamsi on Jun 17, 2010 10:00 PM
    Edited by: Vamsi on Jun 17, 2010 10:01 PM

    Did you try to see the output?
    bcz if you are trying this in mapping testing it will show you like this as this conversion if for xml, so xml will not do anything wrong with the special characters, so for that special characters will be converted like that.
    Once try to run end to end interface and try to see at receiver side that how data looks like.
    Thanks,
    Hetal

  • Character conversion error: Unconvertible UTF-8 character beginning..

    Hello,
    I'm using TrAX for XSLT transformations, and having a following
    problem
    Character conversion error: "Unconvertible UTF-8 character beginning with 0xa9" (line number may be too low).
    org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8 character beginning with 0xa9" (line number may be too low).
            at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
            at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
            at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
            at org.apache.crimson.parser.Parser2.maybeTextDecl(Parser2.java:2795)
            at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2880)
            at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167)
            at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
            at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
            at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
            at mlts.converter.XMLImport.outputESGML(XMLImport.java:311)
            at mlts.converter.Converter.processFile(Converter.java:312)
            at mlts.converter.Converter.Convert(Converter.java:229)
            at test.main(test.java:7)Following the source code, I've found that the exception is thrown
    when it reads DTD. I tried to read DTD using InputSource
    in ascii, in latin-1 and my program reads it without any problem.
    I really appreciate any help,
    Thanks

    http://forum.java.sun.com/thread.jsp?forum=34&thread=254927

  • Character conversion error: "Unconvertible UTF-8 character beginning with 0

    Hi All,
    I developed an Adapter Module and added to Adapter Framework.
    package sample;
    import java.io.InputStream;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.mp.module.ModuleException;
    import com.sap.aii.af.ra.ms.api.Message;
    import com.sap.aii.af.ra.ms.api.XMLPayload;
    @ejbHome <{com.sap.aii.af.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.mp.module.ModuleRemote}>
    @stateless
    public class SetAttachmentName implements SessionBean, Module {
         private SessionContext myContext;
         private String mailFileName = "UStN";
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
         public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              // create a second attachment for the receiver mail adapter
              try {
                   //                  get the XI message from the environment
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   //               creating parsable XML document
                   InputStream XIStreamData = null;
                   XMLPayload xmlpayload = msg.getDocument();
                   XIStreamData = xmlpayload.getInputStream();
                   DocumentBuilderFactory docBuilderFactory =
                        DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                   Document doc = docBuilder.parse(XIStreamData);
                   //            finding the tag's name from the Modules tab in the Directory that will hold the attachment's name
                   String absenderIDTag = null;
                   absenderIDTag = moduleContext.getContextData("<RCVPRN>");
                   //            finding the content of the tag that will be used as the attachment's name (assuming it's the only tag with this name)
                   Element element = doc.getDocumentElement();
                   NodeList list = doc.getElementsByTagName(absenderIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().toString();
                   String anIDTag = null;
                   anIDTag = moduleContext.getContextData("<CREDAT>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(anIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().toString();
                   Date date = new Date(System.currentTimeMillis());
                   //            Add date to the Message
                   SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
                   mailFileName += "_" + dateFormat.format(date);
                   String belegNummerTag = null;
                   belegNummerTag = moduleContext.getContextData("<BULK_REF>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(belegNummerTag);
                   mailFileName += "_" + list.item(0).getFirstChild().toString();
                   //               creating the attachment
                   byte by[] = xmlpayload.getText().getBytes();
                   XMLPayload attachmentPDF = msg.createXMLPayload();
                   attachmentPDF.setName(mailFileName);
                   attachmentPDF.setContentType("application/pdf");
                   attachmentPDF.setContent(by);
                   //adding the message to the attachment
                   msg.addAttachment(attachmentPDF);
                   //                  provide the XI message for returning
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   //                  raise exception, when an error occurred
                   ModuleException me = new ModuleException(e);
                   throw me;
              //                  return XI message
              return inputModuleData;
    I get the following error
    Character conversion error: "Unconvertible UTF-8 character beginning with 0xaa" (line number may be too low).
    Any tips, pointers ?
    Thanks in Advance
    Mukhtar

    Hi Henrique,
    I am using .getNodeValue()
    import java.io.InputStream;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    @ejbHome <{com.sap.aii.af.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.mp.module.ModuleRemote}>
    @stateless
    public class UStNAttachmentName3 implements SessionBean, Module {
         private SessionContext myContext;
         private String mailFileName = "UStN";
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
         public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              // create a second attachment for the receiver mail adapter
              try {
                   // get the XI message from the environment
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   // creating parsable XML document
                   InputStream XIStreamData = null;
                   XMLPayload xmlpayload = msg.getDocument();
                   XIStreamData = xmlpayload.getInputStream();
                   DocumentBuilderFactory docBuilderFactory =
                        DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                   Document doc = docBuilder.parse(XIStreamData);
                   // finding the tag's name from the Modules tab in the Directory that will hold the attachment's name
                   String absenderIDTag = null;
                   absenderIDTag = moduleContext.getContextData("<RCVPRN>");
                   // finding the content of the tag that will be used as the attachment's name (assuming it's the only tag with this name)
                   Element element = doc.getDocumentElement();
                   NodeList list = doc.getElementsByTagName(absenderIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().getNodeValue();
                   String anIDTag = null;
                   anIDTag = moduleContext.getContextData("<CREDAT>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(anIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().getNodeValue();
                   Date date = new Date(System.currentTimeMillis());
                   // Add date to the Message
                   SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
                   mailFileName += "_" + dateFormat.format(date);
                   String belegNummerTag = null;
                   belegNummerTag = moduleContext.getContextData("<BULK_REF>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(belegNummerTag);
                   mailFileName += "_" + list.item(0).getFirstChild().getNodeValue();
                   // creating the attachment
                   byte by[] = xmlpayload.getText().getBytes();
                   XMLPayload attachmentPDF = msg.createXMLPayload();
                   attachmentPDF.setName(mailFileName);
                   attachmentPDF.setContentType("application/pdf");
                   attachmentPDF.setContent(by);
                   //adding the message to the attachment
                   msg.addAttachment(attachmentPDF);
                   // provide the XI message for returning
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   // raise exception, when an error occurred
                   ModuleException me = new ModuleException(e);
                   throw me;
              // return XI message
              return inputModuleData;
    Still I get the same error.
    org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8 character beginning with 0xaa" (line number may be too low).
    Adapter-Framework: Character conversion error: "Unconvertible UTF-8 character beginning with 0xaa" (line number may be too low).
    Regards,
    Mukhtar

  • Unicode character conversion

    Hello,
    From external system we receive XML messages in UTF-8. The data are transfered from XI to SAP WAS by RFC adapter. The communication language is set to 'CS' (Czech).  The data are saved into database with no conversion to set code page (1401). The receiving system is not Unicode compatible.
    Into database are writen unicode chars (e.g. &#x159;) instead of single chars in Czech alphabet.
    Is here any way how to force a XI to make a character conversion ?
    Thanks for any feedback.
    Marian Morzol

    Pl identify your database characterset
    SQL> select * from NLS_DATABASE_PARAMETERS;If the NLS_CHARACTERSET is WE8ISO8859P1, it is not capable of storing the Euro symbol (pl do a google search to find various references).
    To store the Euro symbol, you will most likely need to change the database characterset to UTF8 - pl see the MOS Docs mentioned in this thread for details - Adding Greek & German language to R12
    HTH
    Srini

  • SMQ2 (Inbound Queue) : Error occurred during character conversion

    Hi,
    In SMQ2 an Inbound Queue has failed with status text "Error occurred during character conversion". The XML message inside this queue is in waiting status with status text " Scheduled for Outbound Processing" .
    Even after cancelling this message from SXMB_MONI, and reposting the PO, still again the queue and the XML message inside the queue are in same status.
    As this is in XI production system, requesting to provide some suggestion ASAP.
    Thanks,
    Mateen.

    The queue status is still sysfail. There is only 1 message waiting in the queue.
    I think that the queue might be locked for some reason and after unlocking the queue and restarting the message, the message will get processed successfully.
    But before working on this I want to make sure that the queue is locked.
    Do you or anyone else know how and from where can I check whether the queue is locked or unlocked?
    Regards,
    Mateen.

  • SAXParseException: character conversion error: Illegal character 0x9A...

    This is my problem:
    I use JDom to parse remote XML document with DTD linked to it. But I get that error. Request is:
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(new URL(url));
    This works fine when I use these XML and DTD docs locally, which means that I give xml file name as a parameter from console. Then everything goes well. But when I move my program to server and try to run it there, SAXParseException is thrown. Why???
    Error is:
    error on line 1 of document "http://server.net/doc.dtd" Character conversion error: Illegal ASCII character 0x9A (line number may be too low)
    What this means? And why this just happens when I run program in server? Help, please
    tia J_J

    Exactly that's the problem.
    String class :
    * This class is implemented to map an ordinary java.lang.String
    * into an xml compliant String
    public class String2Xml
         private final String invalidChars [] = {"�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "�",
                                                           "`",
                                                           "�",
                                                           "<",
                                                           ">",
         private final String replaceChars [] = {"��",
                                                           "&#223;",
                                                           "&#228;",
                                                           "&#246;",
                                                           "&#252;",
                                                           "&#196;",
                                                           "&#214;",
                                                           "&#220;",
                                                           "&#167;",
                                                           "&#128;",
                                                           "&#96;",
                                                           "&#180;",
                                                           "<",
                                                           ">",
                                                           "&apos;"};
         * Constructor
         public String2Xml();
         * This operation is implemented to check if the given String
         * matches one of the invalidChars. If an invalid char is found
         * it'll be replaced.
         * @return String - the correct xml String
         public String checkString(String check)
              for (int i = 0; i < invalidChars.length; i++)
                   check = check.replaceAll(invalidChars, replaceChars[i]);
              System.out.println("Check : " + check);
              return check;

  • UDF for Special Character Conversion

    Hello All,
    Can any one help me with the UDF for special character conversion code.
    I mean if a special character is given it should pass a blankspace.
    << Moderator message - Everyone's problem is important >>
    Many thanks,
    Rahul.
    Edited by: Rob Burbank on Oct 29, 2010 4:32 PM

    Hi Rahul ,
    the best way to deal with special character is to use proper encoding in your Sender Communication channel it self .So that in your payload you will get proper value .
    IF you are getting some special character which is not covered in encoding UTF-8 thne you can use encoding IS0-8859-1 .You can easily refer in help that how to use encoding in your communication channel .
    Regards,
    Saurabh

  • XMLELEMENT and suppress character conversion for brackets etc...

    Hi,
    I want use XMLElement, XMLAgg to create a large XML-file from database.
    However I have the problem that I already SELECT valid XML chunks from
    the database. I this case I don't want a character conversion,e.g.
    open angle bracket (<) becomes &lt;
    quotation mark (") becomes &quot;
    and so on.
    Is it possible with my Oracle 9.2 ?

    Hi,
    ok finally I think I found now a solution for my problem which is:
    printing a large XML file in one transaction within sqlplus.
    I let a function create the XML and write it to a CLOB variable.
    In sqlplus I do simply
    -- 1 GB is acceptable
    SET LONG 1073741824;
    SPOOL myspoolfile
    SELECT MYFUNTION FROM DUAL;
    I still have to proof it with mass data.

  • Character conversion error when installing Java Portlet Container Preview

    I'm trying to tets out JSR 168 portlets on our Oracle 10g server. I'm following the instructions at http://portalstandards.oracle.com/
    I download and try to install the "Java Portlet Container Preview Release 2", and I get the following error:
    [oracle@jupiter home]$ java -jar ~/wsrp-install.jar ~/jwsdp-1.3
    File "/home/oracle/jupiter_mid/j2ee/home/config/global-web-application.xml" modified successfully
    oracle.webdb.utils.PortalExceptionImpl: Error transforming file "config/server.xml"
    at oracle.portal.PortalException.<init>(PortalException.java:66)
    at oracle.webdb.wsrp.server.install.InstallException.<init>(InstallException.java:31)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:387)
    at oracle.webdb.wsrp.server.install.Main.install(Main.java:122)
    at oracle.webdb.wsrp.server.install.Main.main(Main.java:98)
    Caused by: javax.xml.transform.TransformerException: Character conversion error: "Unconvertible UTF-8 character beginning with 0x92" (line number may be too low).
    at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:739)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:371)
    ... 2 more
    caused by: ; SystemID: http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd; Line#: 1; Column#: -1
    javax.xml.transform.TransformerException: Character conversion error: "Unconvertible UTF-8 character beginning with 0x92" (line number may be too low).
    at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:739)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:715)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1129)
    at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1107)
    at oracle.webdb.wsrp.server.install.Main.applyTransformation(Main.java:371)
    at oracle.webdb.wsrp.server.install.Main.install(Main.java:122)
    at oracle.webdb.wsrp.server.install.Main.main(Main.java:98)
    [oracle@jupiter home]$
    This is what the server.xml looks like:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!DOCTYPE application-server PUBLIC "-//Oracle//DTD OC4J Application-server 9.04//EN" "http://xmlns.oracle.com/ias/dtds/application-server-9_04.dtd">
    <application-server localhostIsAdmin="true"
    application-directory="../applications"
    deployment-directory="../application-deployments"
    connector-directory="../connectors">
    <rmi-config path="./rmi.xml" />
    <sep-config path="./internal-settings.xml" />
    <jms-config path="./jms.xml" />
    <javacache-config path="../../../javacache/admin/javacache.xml" />
    <log>
    <file path="../log/server.log" />
    </log>
    <transaction-config timeout="30000" />
    <java-compiler name="javac" in-process="false" extdirs="/home/oracle/jupiter_mid/jdk/jre/lib/ext" />
    <global-application name="default" path="application.xml" />
    <application name="BC4J" path="../applications/BC4J.ear" auto-start="true" />
    <application name="BC4JManager" path="../applications/BC4JManager.ear" auto-start="true" />
    <application name="IsWebCacheWorking" path="../applications/IsWebCacheWorking.ear" auto-start="true" />
    <application name="jdev_test2" path="../applications/jdev_test2.ear" auto-start="true" />
    <global-web-app-config path="global-web-application.xml" />
    <web-site default="true" path="./default-web-site.xml" />
    <cluster id="1214162165" />
    </application-server>
    server.xml looks ok, and I've tried tweaking it to no avail. Anyone know what could cause this?

    Could you make sure you don't have any extra Apache libraries hanging around in your global classpath, i.e. ensure there is nothing extra in <J2SE Home>/jre/lib/extThere's a xercesImp.jar under mid/j2ee/OC4J_Portal/applications/jpdk/jpdk/WEB-INF/lib/xercesImpl.jar, but there's also one under jwsdp-1.2/jaxp/lib/endorsed/xercesImpl.jar. Is that supposed to be in there?
    Neither of these are getting loaded, though; running java -verbose shows that all of org.apache.xalan.* is being loaded from mid/jdk/jre/lib/rt.jar
    FWIW, ../../lib/xmlparserv2.jar does exist, but doesn't look like it's being loaded. :-\

  • SAXParser character conversion

    I have a problem … a very peculiar one could you please guide.
    Original message: Kevätsunnuntaisin lentää
    The following is the encoding of the first 7 characters
    4b 65 76 c3 a4 74 73 75 – in UTF-8 this is the encoding desired
    4b 65 76 a3 74 73 75 – in the Parser - faulty encoding
    InputSource inputSource = new InputSource(myInputStream);
    inputSource.setEncoding("UTF-8");
    parser.parse(inputSource);
    The original string gets converted to Kev£tsunnuntaisin lent££.Also, there is a loss of a byte.
    Could you please guide me where I am going wrong? What must I do to avoid this character conversion?
    Thanks for your help!!!

    Yes, that's wrong. The bytes "c3 a4" should be decoded via UTF-8 to the character "e4", not "a3".
    It seems to me that if you pass an InputStream to the parser, you don't need to tell the parser what encoding to use. It should normally be able to figure that out by looking at the prolog of the document being input. But if it's really encoded in UTF-8, it shouldn't do any harm to tell the parser that.
    You are passing an InputStream to the parser, are you not? Your variable name suggests that but there's no code to prove it. You could try passing it directly to the parser and not wrapping it in an InputSource.

Maybe you are looking for