webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Special Characters UTF8

    Posted Mon October 07, 2002 03:01 PM

    Hi folks,

    We have a problem encoding special characters like é, ç, à, … to an xml-file.
    If we put Encoding to “true” in the recordToDocument service xml-data is created: encoding of &, , … is done correctly. However, special characters like é, ç, à, … do not appear encoded in the xml-data.

    After sending over http, the characters é, ç, à, … are misformed.

    Any help is highly appreciated for this urgent matter.
    regards
    Wouter & Claire


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 2.  RE: Special Characters UTF8

    Posted Mon October 07, 2002 03:52 PM

    What is decoding the HTTP post?
    How is the XML string created by recordToDocument converted to bytes?

    1. Try adding the HTTP header Content-type=text/xml ; charset=“UTF8” to the HTTP POST. This should get the client to decode the entire message as UTF-8.

    2. Make sure the string is converted to UTF-8 by sending it to pub.string:stringToBytes with an explicit encoding.

    3. The destination XML parser may not implement the default encoding correctly, so you may need to add @encoding = UTF-8 to the boundNode sent to recordToDocument, so there is an explict encoding= in the XML prologue.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Special Characters UTF8

    Posted Mon October 07, 2002 04:42 PM

    hi Fred,

    This is how the XML string is created:

    • first a recordToDocument step
    • then a stringTodocumentstep

    In both steps we tried utf-8 as encoding type, but still the character é, à, … is transformed into a very strange (unreadable) character in the XML data.

    Do you have any suggestions?
    Thanks!!
    Wouter


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: Special Characters UTF8

    Posted Mon October 07, 2002 05:23 PM

    What version of Integration Server are you using?

    Just so I’m sure I understand, the output of recordToDocument is something like:

    <?xml version=“1.0” encoding=“UTF-8”?>
    <myDoc>
    <myElement>é, ç, à</myElement>
    </myDoc>

    This is sent as a Java String directly to stringToDocument. How do you see the unreadable characters? using documentToRecord? queryDocument?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB