Bug? HttpService double encodes ampersand entities

Hi,
i am a bit surpriced, that i didnt find anything about it. Maybe I do something wrong.
If i load a xml file from the server with the HttpService, i get the xml file with all Ampersand signs "&" converted in "&" despite its already part of "&".
So if i load a xml like:
<xml>We &amp; You</xml>
HttpService converted the xml to:
<xml>We &amp;amp; You</xml>
Usually I use flash to update the xml-files and save them on server. After some savings i get results like:
<xml>We &amp;amp;amp;amp;amp;amp;amp;amp;amp;amp; You</xml>
The way i load the files (short version):
var service:HTTPService = new HTTPService();
service.method="POST";
service.resultFormat="e4x";
service.url = "...";
service.send();
The only way i see is to clean up the loaded xml from " &amp;amp;" to " &amp;" which sounds wrong.
Do you know that problem? Do you have any ideas?
ty Jan
PS: I use a proxy (Service Capture), so i can see the message comming from the server is still with a simple &amp;. If i look at the message.body of the result of the HttpService event i see the ampersand entitie already converted in &amp;amp;. So I conclude a bug in the HTTPService Class.

Similar Messages

  • XML Parsing attributes with encoded ampersand causes wrong order

    Hi all,
    I am writing in the forum first (because it could be that i am doing something wrong.... but i think it is a bug. Nonetheless, i thought i'd write my problem up here first.
    I am using Java 6, and this has been reproduced on both windows and linux.
    java version "1.6.0_03"
    Problem:
    read XML file into org.w3c.dom.Document.
    XML File has some attributes which contain ampersand. These are escaped as (i think) is prescribed by the rule of XML. For example:
    <?xml version="1.0" encoding="UTF-8"?>
         <lang>
              <text dna="8233" ro="chisturi de plex coroid (&gt;=1.5 mm)" it="Cisti del plesso corioideo(&gt;=1.5mm)" tr="Koro&#305;d pleksus kisti (&gt;=1.5 mm)" pt_br="Cisto do plexo cor&oacute;ide (&gt;=1,5 mm)" de="Choroidplexus Zyste (&gt;=1,5 mm)" el="&Kappa;&#973;&sigma;&tau;&epsilon;&iota;&sigmaf; &chi;&omicron;&rho;&omicron;&epsilon;&iota;&delta;&omicron;&#973;&sigmaf; &pi;&lambda;&#941;&gamma;&mu;&alpha;&tau;&omicron;&sigmaf; (&gt;= 1.5 mm)" zh_cn="&#33033;&#32476;&#33180;&#22218;&#32959;&#65288;&gt;= 1.5 mm&#65289;" pt="Quisto do plexo coroideu (&gt;=1,5 mm)" bg="&#1050;&#1080;&#1089;&#1090;&#1072; &#1085;&#1072; &#1093;&#1086;&#1088;&#1080;&#1086;&#1080;&#1076;&#1085;&#1080;&#1103; &#1087;&#1083;&#1077;&#1082;&#1089;&#1091;&#1089; (&gt;= 1.5 mm)" fr="Kystes du plexus choroide (&gt;= 1,5 mm)" en="Choroid plexus cysts (&gt;=1.5 mm)" ru="&#1082;&#1080;&#1089;&#1090;&#1099; &#1089;&#1086;&#1089;&#1091;&#1076;&#1080;&#1089;&#1090;&#1099;&#1093; &#1089;&#1087;&#1083;&#1077;&#1090;&#1077;&#1085;&#1080;&#1081; (&gt;=1.5 mm)" es="Quiste del plexo coroideo (&gt;=1.5 mm)" ja="&#33032;&#32097;&#33180;&#22178;&#32990;&#65288;&gt;=1.5mm&#65289;" nl="Plexus choroidus cyste (&gt;= 1,5 mm)" />
    </lang>As you might understand, we need to have the fixed text '>' for later processing. (not the greater than symbol '>' but the escaped version of it).
    Therefore, I escape the ampersand (encode?) and leave the rest of the text as is. And so my > becomes >
    All ok?
    Symptom:
    in fetching attributes, for example by the getAttribute("en") type call, the wrong attribute values are fetched.
    Not only that, if i only read to Document instance, and write back to file, the attributes are shown mixed up.
    eg:
    dna: 8233, ro=chisturi de plex coroid (>=1.5 mm), en=&#1082;&#1080;&#1089;&#1090;&#1099; &#1089;&#1086;&#1089;&#1091;&#1076;&#1080;&#1089;&#1090;&#1099;&#1093; &#1089;&#1087;&#1083;&#1077;&#1090;&#1077;&#1085;&#1080;&#1081; (>=1, de=Choroidplexus Zyste (>=1,5 mm)Here you can see that 'en' is shown holding what looks like greek, ... (what is ru as a country-code anyway?) where it should have obviously had the english text that originally was associated with the attribute 'en'
    This seems very strange and unexpected to me. I would have thought that in escaping (encoding) the ampersand, i have fulfilled all requirements of me, and that should be that.
    There is also no error that seems to occur.... we simply get the wrong order when fetching attributes.
    Am I doing something wrong? Or is this a bug that should be submitted?
    Kind Regards, and thanks to all responders/readers.
    Sean
    p.s. previously I had not been escaping the ampersand. This meant that I lost my ampersand in fetching attributes, AND the attribute order was ALSO WRONG!
    In fact, the wrong order was what led me to read about how to correctly encode ampersand at all. I had been hoping that correctly encoding would fix the order problem, but it didn't.
    Edited by: svaens on Mar 31, 2008 6:21 AM

    Hi kdgregory ,
    Firstly, sorry if there has been a misunderstanding on my part. If i did not reply to the question you raised, I appologise.
    In this 'reply' I hope not to risk further misunderstanding, and have simply given the most basic example which will cause the problem I am talking about, as well as short instructions on what XML to remove to make the problem disappear.
    Secondly, as this page seems to be displayed in ISO 8859-1, this is the reason the xml I have posted looks garbled. The xml is UTF-8. I have provided a link to the example xml file for the sample below
    [example xml file UTF-8|http://sean.freeshell.org/java/less2.xml]
    As for your most recent questions:
    Is it specified as an entity? To my knowledge (so far as my understanding of what an entity is) , yes, I am including entities in my xml. In my below example, the entities are the code for the greater than symbol. I am under the understanding that this is allowed in XML ??
    Is it an actual literal character (0xA0)? No, I am specifying 'greater than' entity (code?) in order to include the actual symbol in the end result. I am encoding it in form 'ampersand', 'g character', 't character', 'colon' in order for it to work, according to information I have read on various web pages. A quick google search will show you where I got such information from, example website: https://studio.tellme.com/general/xmlprimer.html
    Here is my sample program. It is longer than the one you kindly provided only because it prints out all attributes of the element it looks for. To use it, only change the name of the file it loads.
    I have given the xml code seperately so it can be easily copied and saved to file.
    Results you can expect from running this small test example?
    1. a mixed up list of attributes where attribute node name no longer matches its assigned attribute values (not for all attributes, but some).
    2. removing the attribute bg from the 'text' element will reduce most of these symptoms, but not all. Removing another attribute from the element will most likely make the end result look normal again.
    3. No exception is thrown by the presence of non xml characters.
    IMPORTANT!!! I have only just (unfortunately) noticed what this page does to my unicode characters... all the the international characters get turned into funny codes when previewed and viewed on this page.
    Whereas the only codes I am explicitly including in this XML is the greater than symbol. The rest were international characters.
    Perhaps that is the problem?
    Perhaps there is an international characters problem?
    I am quite sure that these characters are all UTF-8 because when I open up this xml file in firefox, It displays correctly, and in checking the character encoding, firefox reports UTF-8.
    In order to provide an un-garbled xml file, I will provide it at this link:
    link to xml file: [http://sean.freeshell.org/java/less2.xml]
    Again, sorry for any hassle and/or delay with my reply, or poor reply. I did not mean to waste anyones time.
    It will be appreciated however if an answer can be found for this problem. Chiefly,
    1. Is this a bug?
    2. Is the XML correct? (if not, then all those websites i've been reading are giving false information? )
    Kindest Regards,
    Sean
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    public class Example
        public static void main(String[] argv)
              try
                   FileInputStream fis = new FileInputStream("/home/sean/Desktop/chris/less2.xml");
                 Document doc = DocumentBuilderFactory.newInstance()
                 .newDocumentBuilder()
                 .parse(new InputSource(fis));
                   Element root = doc.getDocumentElement();
                   NodeList textnodes = root.getElementsByTagName("text");
                   int len = textnodes.getLength();
                   int index = 0;
                   int attindex = 0;
                   int attrlen = 0;
                   NamedNodeMap attrs = null;
                   while (index<len)
                        Element te = (Element)textnodes.item(index);
                        attrs = te.getAttributes();
                        attrlen = attrs.getLength();
                        attindex = 0;
                        Node node = null;
                        while (attindex<attrlen)
                             node = attrs.item(attindex);          
                             System.out.println("attr: "+node.getNodeName()+ " is shown holding value: " + node.getNodeValue());
                             attindex++;                         
                        index++;
                        System.out.println("-------------");
                 fis.close();
              catch(Exception e)
                   System.out.println("we've had an exception, type "+ e);
    }  [example xml file|http://sean.freeshell.org/java/less2.xml]
    FOR THE XML, Please see link above, as it is UTF-8, and this page is not. Edited by: svaens on Apr 7, 2008 7:03 AM
    Edited by: svaens on Apr 7, 2008 7:23 AM
    Edited by: svaens on Apr 7, 2008 7:37 AM
    Edited by: svaens on Apr 7, 2008 7:41 AM

  • Pixel Aspect Ratio bug in Media Encoder export

    Having a weird bug in media encoder exports that I can't seem to figure out. I have a 1080p sequence with a mix of 1080p footage and PAL DV assets. The PAL assets have a pixel aspect ratio of 1.0940. When I format them in my Premiere sequence, I am able to scale them correctly and they look fine. When I export them directly from premiere to broadcast standards it's also fine.
    However, when I try to export these sequences in Media Encoder via File->Export->Media-> Queue using the same exact settings (I'm using a preset), Media Encoder formats the PAL assets as if they have square pixels. Thus, half of the footage in my sequences gets horizontally "squished." Note that this does not happen for footage that natively has square pixels, such as my 1080p camera footage.
    Has anyone encountered this bug? It seems strange to me that Media Encoder would treat items in a sequence differently that Premiere during export, I was under the impression they were using the same rendering engine... It's really a problem as I'm going to have to crank out multiple versions of this 48-minute film and not being able to queue those exports is going to be a huge headache.
    Using latest version of CC 2014.1 (8.1.0).

    Screenshot of Premiere Export (fills screen):
    Screenshot of Media Encoder export: (notice the pillar-boxing)

  • Inserting XML encoded ampersands into tables with OracleXMLSave / XMLLoader

    Hi,
    I've an XMLLoader application based on Steve Muench's design.
    My client has given me XML documents with XML encoded ampersands.
    The XMLloader (OracleXMLSave) is treating the ampersand as a substitution token and is adding chunks of unexpected text when it inserts the strings containing ampersands.
    How do I turn off the substition within the JDBC?
    Thanks,
    Steve.

    If your XML Document looks like:
    <ROWSET>
    <ROW>
    <FIELD1>val-1</FIELD1>
    <FIELD12>val-12</FIELD12>
    </ROW>
    </ROWSET>
    it will insert into just those two
    fields, the rest will be null for
    the purposes of the insert.

  • Bug with double division ??

    Hello,
    first sorry my bad english...
    I am trying to convert a C program in java and i had a big problem with double division.
    For example, my program needs to do that :
    double d = 2. * 3.1415926 ;
    double d2=511;
    double d3=d/d2;
    The value in memory of d3 is 0x3f892e92965e074e whereas with my original C program, for the same code) the value in memory is 0x3f892e92965e074d !!!!!! (the last byte is different)
    So what is the problem ? Is the double division in java different with the C language or is it my code which has a problem ??
    Thanks a lot

    It could be different than (some implementation of) C, but that doesn't mean it's a bug or a problem. Java is supposed to implement an IEEE floating point specification; if you can demonstrate that it's not following that spec (I think it's IEEE 754) then report it as a bug. Incidentally, do Java and your version of C implement 3.1415926 the same way?
    (Also, if that number is supposed to be pi, then the inaccuracy you claim in Java is much less than the inaccuracy you made by using an approximation to pi.)

  • IOS 5 bug in double speed playback

    There is a newly introduced bug in iOS 5 with regard to playing podcasts at double speed (using the little 2x symbol in the top right).
    The playback works just fine and it is a great way to consume a lot of podcasts quickly, but if I make a phone call when the call ends the podcast continues, but at normal speed. The screen still shows 2x, but it is playing at 1x. I have to press the button a few times to cycle back to 2x again, where it then is back to doublespeed.
    I could not see an easy way to report a bug, so I am posting it here in the hope of getting it to the person that needs to know and can fix it.

    Ok correction: this problem has occurred only once. That I found nothing can be clicked in app store.app. But right after I quit and get back, everything looks fine. Dont know why it happened at first, even dont know wheter it will happen again.

  • Various components double-render/double-encode on save!!

    Hi.
    I am in urgent need of assistance.
    I am trying to develop an ADF/BC-JSF app in 10.1.3.4 JDeveloper.
    I am encountering an error where, when I commit or rollback, various ADF Faces UI components on my page render/encode twice. Also sometimes on panelForms the labels get misaligned with the data fields.
    There does not seem to be any error associated. I have all the logging and debugging I know about turned on.
    This behaviour seems to be be related to doing inserts.
    Has anybody seen this behavior before?
    Michael F.
    Edited by: Michael B. Fons on Aug 26, 2009 4:22 PM

    Thank you, Timo, for your helpful response...however...
    Actually it turned out to be...
    Rule of thumb: be careful of using af:forEach in af:table rows to generate the options of a select list. Much safer to use getter to get a list and plug into value of f:selectItems (plural), than to use f:selectItem (singular) and use af:forEach to iterate over. af:iterator might work instead of af:forEach, too, but I am not sure.
    Also mixed in with this was using forEach's varStatus property...something I have had bad luck with in the past.
    Basically what was happening, was this forEach was not even on a part of the screen that was getting rendered, but it was causing components to render multiple times and get all mixed up. Pretty hard to track down.
    So in this particular case I would get this doubling when I used the following inside of an af:selectOneChoice...
    <af:forEach begin="1"
    end="#{bindings.ListContCaseDiagIterator.estimatedRowCount}"
    var="priorityRow"
    varStatus="priorityLoop">
    <f:selectItem itemLabel="#{priorityLoop.index}"
    itemValue="#{priorityLoop.index}"/>
    </af:forEach>
    ...instead of using someting like the following...
    <f:selectItems
    value="#{CaseDemographics.priorityList**bindings.ListCaseDiagIterator.estimatedRowCount**}"/>
    The use-case for this problem was a bit odd, but nothing too bad...
    (Pardon the use of ** when I meant [ ... the trouble is a square bracket gets interpreted as a link reference, so I used ** instead.  This syntax is a trick Steve Muench had, related to using HashMaps in the backing bean and overriding the get method.  I had the get method return a select list and it took the integer within the square brackets as a parameter)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Video/audio editing bug in Media Encoder

    I have a large MOV file that contains multiple film
    presentations, one after the other. They are separated by a few
    seconds of dead air. I'm using Video Encoder's built-in edit tool
    to slide to the end of a presentation and then export that to FLV.
    Using my arrow keys, I can pinpoint the exact millisecond I want it
    to stop.
    However, when I export these to FLV files, audio (but not
    video) continues to play for several seconds even past the point at
    which I had set the cutoff.
    I tried duplicating the same thing using Flash 8 Video
    Encoder, and didn't have a problem. It only appears to be an issue
    with Flash CS3 Video Encoder.
    Can anyone duplicate what appears to be a bug?

    Screenshot of Premiere Export (fills screen):
    Screenshot of Media Encoder export: (notice the pillar-boxing)

  • Portal 10g Portal Search - Bug 3526715: doubled Perspektives

    1. I also run into bug 3526715: Perspective in customized Search portlet double, tripple, x-ipple.
    But, I cannot extract any solution from the note coming with bug 3526715 beside upgrading to Version 9.0.4.1 - Is there any patch for 9.0.4.0?
    2. Is Portal version 9.0.4.1 already published?
    Regards,
    Michael

    Portal9041 is available now for Solaris
    There is as yet no patch for 9040 for this bug

  • Bug report:  double clicking a DataAction

    following the information in the bug, here is what I copied:
    Message
    BME-99009: An error has occured in the Java VM.
    Cause
    An operation has failed because an error has occurred in the Java VM. The current activity may fail and the system may have been left in an unstable state. The following is a stack trace.
    java.lang.StackOverflowError
    Action
    If further errors occur, you should restart the application.
    If the error was an OutOfMemoryError, try closing some components, such as some diagrams, or increase the Java heap size.
    Also, report the problem on the JDeveloper forum on otn.oracle.com, or contact Oracle support, giving the information in this message.
    I was trying to double click and create the "action class" on a data action.

    It appears that this bug is caused when a "DataAction" class is not assigned to the struts action. I created the class, inherited oracle's DataAction class, and then pointed the struts config to the right file. Now, double clicking on the dataAction gets the correct .java file to pop up.

  • Is there a bug in 'Double'?

    When running the following code:
    public class Test {
    public static void main(String[] args) {
    System.out.println(273.15-25);
    the output is 248.14999999999998. To me, that looks like a calculation error. Surely, the answer is 248.15? There appears to be some kind of error with 'Double'. Of course, the answer is not far off with only 2e-14 less than the real answer. It is, none the less, very bothersome. Is there any way to gain correct decimal calculations when using Java, or do I have to use a different programming language? Or am I the real problem here... I do not think so.

    You have struck upon a problem as old as Babbage himself. Representations of floating point numbers in a binary system are almost impossible to do with complete accurracy.
    This is not a bug.. well... not a Java bug anyway. You'll find this behaviour in almost any language. IEEE 754 covers the specification for floating point arithmetic in binary systems.

  • HTTPService and encoding

    I currently have a service right now that can take Arabic
    text. The problem is when I make the call to the service as you see
    below, it seems to url encode the variables. Is there a way to stop
    this? Thanks in advance.
    var searchService:HTTPService = new HTTPService();
    searchService.url = searchURL;
    searchService.method = "POST";
    searchService.resultFormat= "xml";
    var params:URLVariables = new URLVariables();
    //var params:Object = new Object();
    params.searchData = myXML;
    searchService.send(params);

    Found the solution. By specifying the char encoding in the header it solves the problem.
    HTTPService.headers={
    "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"};
    I was not able to specify the encoding using HTTPService.contentType.

  • Bug with Cyrillic encoding in Outlook messages forwarded/sent from iphone/ipad

    When forwarding mail that is written in Russian from iPhone or iPad using mail.app, the message turns to unreadable and the recipient needs to change the encoding manualy(if he/she knows how).
    The only solution is to use a third-party app, such as ibis mail. Or if you prefer to use the mail.app by Apple,therefore,  you need:
    To add a symbol like "י" letter in hebrew to your signature (you can add a hebrew keyboard in iOS for this and uninstall it when you are done) and that's it.all your messages that you write or forward from iPad/iPhone will be decoded correctly on any mail client the recipient has.

    If the user prefers something other than Hebrew, I think the same result can be had by adding a dingbat.  These can easily be found in an app like Unicode Map.  ✈✌✩❄➳

  • Bug with Cyrillic encoding in Outlook messages forwarded/sent from iPad

    When forwarding mail that is written in Russian from iPhone or iPad using mail.app, the message turns to unreadable and the recipient needs to change the encoding manualy(if he/she knows how).
    The only solution is to use a third-party app, such as ibis mail. Or if you prefer to use the mail.app by Apple,therefore,  you need:
    To add a symbol like "י" letter in hebrew to your signature (you can add a hebrew keyboard in iOS for this and uninstall it when you are done) and that's it.all your messages that you write or forward from iPad/iPhone will be decoded correctly on any mail client the recipient has.

    If the user prefers something other than Hebrew, I think the same result can be had by adding a dingbat.  These can easily be found in an app like Unicode Map.  ✈✌✩❄➳

  • OSX Mavericks bug? Double screen configuration

    Running OSX Mavericks, Adobe CC, on a iMac 27" with a second screen for help palettes.
    Since I have updated to OSX Mavericks I have started to have big problems with the applications within the Adobe CC package. When I leave for example InDesign to make a quick look at another program, like my mailbox, then when I go back to InDesign, my help palettes jumps back to the main screen. Pressing the right arrow at the top right corner of any help palette all of the palettes jumps right back to the second screen.
    Anyone with the same problem?
    Secondly sometimes when I have to choose from a scrolldown menu in a palette placed on the second screen, the choises of the scrolldown menu shows up at the primary screen.
    It seems to be a problem where the Adobe CC application in question is not aware of the double screen work environment.
    Anyone withn the same problems, and any idea on how it can be solved? It is quite annoying and considerably slows down a highspeed workflow.
    Please comment.

    Yep, Sorry.     https://discussions.apple.com/message/23464771#23464771
    Confidentiality: This e-mail and any files transmitted with it are
    confidential and intended solely for the use of the individual or entity
    to whom they are addressed. If you have received this e-mail in error
    please notify the sender immediately and delete this message from your
    computer without further action. Any dissemination, distribution or
    copying of this message or any files transmitted with it by an
    unauthorised recipient is strictly prohibited.
    For information about t. overgaauw, please see www.tovergaauw.nl.
    http://www.saatchionline.com/tovergaauw

Maybe you are looking for

  • How to create a block key default for documents created by MIRO?

    Hi All, How to create a block key (BSEG-ZLSPR) default for documents created by MIRO? Could anyone tell me? Thanks Gandalf

  • HP 8600 not found by iPad or iPhones

    We had a new router installed by our internet company now my ipad, my iphone 5 and iphone 4 and apple tv can not find the printer. the printer is not an air print printer. We keep getting the message no air printer found. All of these devices were ab

  • Strange output.. Suggestions?

    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production PL/SQL Release 11.2.0.3.0 - Production CORE     11.2.0.3.0     Production TNS for Solaris: Version 11.2.0.3.0 - Production NLSRTL Version 11.2.0.3.0 - Production I have a us

  • Bluetooth and Curve Sync Possible?

    I am using Oulook 2003, BB 8830 and Windows XPpro. I have configured my bluetooth usb. Is it possible to transfer calendar items with bluetooth?   Thanks

  • Problem with BAPI_REQUISTION_RELEASE

    Hello All, I need to release PR's and for that am using 'BAPI_REQUISTION_RELEASE'. I am required to execute the program in batch job. The program works perfectly in foreground but when it is executed through the batch job , PR is not released and the