Rendering text that contains old-style HTML character entities, e.g. ü

The large text-corpus I'm working with was produced before the days of widespread Unicode support, and it contains HTML character entities instead of unicode codepoints, e.g. ü for ü [u-umlaut].
I can iterate through every text column in the ArrayCollections that I'm using for dataProviders to the DataGrid, and replace these entities with their unicode counterparts before the provider is assigned to the grid. But is there already a mechanism in place in Flex to render character entities in the DataGrid? Is there a ready-made ItemRenderer that can do this?
Thanks

DrClap wrote:
So your example looks like this?
<someNode>der fuchs springt &#252;ber den stein</someNode>
now I feel stupid :-) Yes, that's correct.
And you're actually getting an EntityReference node in your Document? I find that rather strange, since the documentation for EntityReference says
Note that character references and references to predefined entities are considered to be expanded by the HTML or XML processor so that characters are represented by their Unicode equivalent rather than by an entity reference.
Exactly!
Because what you have there is a character reference. Is there something else in the document, a DTD for example, which might be interfering with that?No, just an ordinary XML header:
<?xml version="1.0" encoding="UTF-8"?> ...If it helps, I can also post the complete document I am receiving.

Similar Messages

  • Okay i had to install Itunes onto my new OS because window's Vista messed up on me and i can't get any of my old purchases back from my account such as music and movies any ideas on how to get them back (i do not have the folder that contains old items)

    Okay i had to install Itunes onto my new OS because window's Vista messed up on me and i can't get any of my old purchases back from my account such as music and movies any ideas on how to get them back (i do not have the folder that contains old items from the last itunes or anything from that OS because it had a virus and i just wanted windows 7)

    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Hope this helps,
    JD

  • Weblogic xss vulnerablity : html character entities getting decoded in jsp by ${} expression

    This is from my question at stack overflow java - Weblogic xss vulnerablity : html character entities getting decoded in jsp - Stack Overflow
    I am using a filter to prevent xss by encoding html character of my jsp form parameters.
    I am resolving them in jsp using ${param} expression.
    This is working fine in tomcat as the values are resolved as is, but on weblogic the values are getting decoded, causing the XSS to succeed
    I am using this simple code in jsp to test it
    <c:set var="testing" value="eb011&quot;&gt;&lt;img src=a onerror=confirm(1)&gt;47379"/> <input type="hidden" name="encoding" value="${testing }"/>
    Result in tomcat
    <input type="hidden" onerror="confirm(1)&gt;47379&quot;/" src="a" &gt;&lt;img="" value="eb011" name="encoding">
    Result in weblogic
    <input type="hidden" value="eb011" name="encoding"><img onerror="confirm(1)" src="a">47379"/&gt;
    why is weblogic decoding html codes and what could be done to prevent it.

    It is really handy to learn how to read schema validation errors. It really does say exactly what's wrong there. If you can get access to the XSD that your XML document is prescribing, you should be able to tell what mistake you made. If you learn how to do this, you'll never have to ask questions like this again. :)
    The error refers to the "http://www.bea.com/ns/weblogic/weblogic-web-app" namespace, which I believe is in your "weblogic.xml" file. It's saying that in the "jsp-descriptor" element, it found a "noTryBlocks" element at a point where it was not legal. At that point, it expected to find either a "'precompile-continue" or several other elements, but not that one. Read the XSD to determine the correct order for elements. If you're editing this file in Eclipse, you may not even have to obtain the XSD. If you hover the mouse over the root element of the document, it will give you a popup showing the syntax details of the element, which will tell you what the expected order of elements is.

  • Mapping XML tags to paragraph styles that contain nested styles

    I am importing XML into InDesign (CS5.5) and the tag mapping to styles is working fine until I get to a paragraph style that contains a nested style.
    I have a sentence that starts with a number:
    1the dog runs fast.
    In InDesing properly styled looks like this:
         1  The dog runs fast.
    (tab)1(tab)The dog runs fast.
    The number is styled with a character style (Number) and the whole sentence is styled with a paragraph style (Sentence). In order to get the tabs in between the number, I have a nested style within the paragraph style (Sentence). This triggers the tabs when it hits the character style (Number) like this:
    Number up to 2 Tab Characters
    In XML, it looks like this
    <sentencetag><numbertag>1</numbertag>The dog runs fast.</sentencetag>
    Sentencetag is mapped to Sentence paragrph style and Numbertag is mapped to Number character style, but the nested style for the tabs are not displaying. I just get this in IND.
    1the dog runs fast.
    Everything works beautifully until I hit the nested styles, which I do need to get to work somehow. Any help would be much appreciated.
    Thanks in advance!

    It sounds like your tab characters are actually disappearing from content in the XML. Jeff was responding to the fact that they need to be there, and you state that you originally had them in your document, but they are not showing up once imported through the XML.
    The tabs may be disappearing in the XML document due to the "TAB" character in your text editor not being a tab, or at least not properly-formed XML TAB equivalent, OR because you are not "importing whitespace elements" when you import your XML.
    Importing whitespace elements can wreak havoc on other things in your XML structure and styled layout within the Indesign document, so I would put the XML quivalent of TAB everywhere a tab should be in your XML, and make sure NOT to import whitespace (when importing XML using "Merge Content", select not to import whitespace items from the import options).
    I believe the XML friendly character code for a TAB character is "&#9;" or "&#09;" but have not tested this. Don't include quotes when adding the character code, just the ampersand, semicolon, and everything in-between.
    Also, sounds like your tags are mapping ok for you, so your XML should look something like:
    <sentencetag>&#9;<numbertag>1</numbertag>&#9;The dog runs fast</sentencetag>.
    It should't matter where you put the TAB character equivalent in relation to your nested tag.

  • Copy and paste text that contains 1/2

    '''ALL''' text from any Firefox webpage that contains the character "1/2"… when pasted into a word processing document (Appleworks v. 6.2.9, in this case) inserts MULTIPLE 1/2 spaces.
    All individual text characters are thus separated by two (2) 1/2 spaces and word spacings are three (3) 1/2 spaces.

    The way to do it in previous versions (at least in version 9) was by
    right-clicking the field and selecting Duplicate. This created copies of the
    fields in the same place as the original, but also with the same name, and
    therefore the same value. You will need to rename them if you want them to
    be unique. If you need to do this very often, a script might be a better
    solution.

  • Copy Paste text that contains cross-references destroys them

    Hi folks,
    Using ID CS 5.5.
    Working on a book file that contains ca. 30 documents.
    Copying (or cutting) and pasting any text that includes a cross-reference to another document in the book breaks the cross-reference.  This happens even if pasting directly back into the same location.  Cross-references to locations within the same document are not affected.
    Is this a known issue?  Is there some kind of work around?  It seems like too big a bug to not already be solved.
    Thanks.
    EDIT: working on this further, I realize it's actually much, much worse than I've described.  Copying and pasting crossrefs across documents can sometimes destroy all cross refs in all documents in the book.

    painstakingly change each setting on the control tab.
    Painstakingly is your only option other than using something like this: http://www.xmedit.com/
    -DH

  • HTML character entities problem in saved regex search and replace query

    I have a many search and replace regular expression queries (.dwr files) that I have saved. I have a problem specifically with saved queries that contain HTML entities such as "& nbsp ; " or "& shy ;" (spaces added otherwise code doesn't render in browser). For example if I use the following search:
    ([\d]{3}& shy ;[\d]{3}& shy ;[\d]{4}|[\d]{3}& nbsp ;[\d]{3}& nbsp ;[\d]{4})
    (which searches for numbers in the 888-555-1234 or 888 555 1234 formats)
    This will work fine if I manually enter it into the search text area. However if I save it to file and reload it, it will no longer work because the &shy; and   characters are now displayed as " " (space) and "-"(shy) rendering the saved query useless as it's no longer searching for the code. I have some fairly long and complex queries and this is becoming a problem.
    Thanks for any help.
    I'm currently using Dreaweaver CS4 at home and CS5.5 at work.

    Thanks for your reply Kenneth, but that is not what I'm trying to accomplish. I'm looking for the HTML entities that exist in the source code which are & shy ; and & nbsp ; (without the spaces). As I mentioned above, if I enter them manually in the search box, I will get the corrrect results. If I save the search and then reload it, the special characters are no longer in HTML and the search is now useless.
    Just for example again
    In an open document in code view insert a number in the format (without the spaces): 888& nbsp;888& nbsp ;8888
    Open a search dialog box and enter (without the spaces): [\d]{3}& nbsp ;[\d]{3}& nbsp ;[\d]{4}
    The search will find that entry.
    Save search as phone.dwr for example. Then load it and try the search again. It won't work because upon loading the search Dreamweaver replaces the HTML code which was saved with the rendered HTML. So now the search shows up as: [\d]{3} [\d]{3} [\d]{4} which will not find the string with hard coded non-breaking spaces that I'm looking for.
    Basically I want to be able to save a search query for reuse. When I load a search query, I want it to be exactly what I saved, not something that DW has rendered (that doesn't work).

  • Displaying HTML character entities in JEditorPane

    Hi,
    I have noticed that when displaying HTML character entity references in a JEditorPane it will show some of them, e.g. &copy; for copyright symbol but not others e.g. &rsquo; for "curly" single quote.
    Is there any way to get JEditorPane to show all (most?) of them?

    Create a class that extends ComboBox and override the
    updateDisplayList and measureText functions. Then use that new
    ComboBox in your code:
    <local:HtmlComboBox .. xmlns:local="components.*".>
    <local:itemRenderer>
    <mx:Component>
    <mx:Text htmlText="{data.label}" />
    </mx:Component>
    </local:itemRenderer>
    </local:HtmlComboBox>
    Put this into a folder called "components" and name the file
    HtmlComboBox.as
    package components
    import mx.controls.ComboBox;
    import flash.text.TextLineMetrics;
    public class HtmlComboBox extends ComboBox
    public function HtmlComboBox()
    super();
    override protected function
    updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    super.updateDisplayList(unscaledWidth,unscaledHeight);
    var s:String = textInput.text;
    textInput.htmlText = s;
    override public function
    measureText(text:String):TextLineMetrics
    return measureHTMLText(text);
    }

  • How do I display Tools Developer Page Source without HTML Character Entities, such as & and

    I am using Firefox 8.0 on Windows XP. In earlier versions of Firefox, when I would display the page source, the page would be displayed in all its original characters, including < > & and so on (including the HTML reserved characters.)
    Now when I display page source, the page source is displayed, but instead of displaying html tags,
    <p> for example,
    it will display &lt;p&gt; in the source instead.
    For a longer example, instead of displaying
    <p class="stuff">text to display</p>
    the source is rendered as
    &lt;p class=&quot;stuff&quot;&gt;text to display&lt;/p&gt;
    Is there a way to direct Firefox to display page source using all actual characters instead of using character entities?

    Clarification.
    The html tags render until it encounters this code:
    <input id="htmlHidden" type="hidden" value="&amp;lt;div id=&amp;quot;content&amp;quot;&amp;gt;
    &amp;lt;div id=&amp;quot;content-inside&amp;quot;&amp;gt;
    &amp;lt;div id=&amp;quot;content-space&amp;quot;&amp;gt;
    &amp;lt;div id=&amp;quot;about&amp;quot; class=&amp;quot;node&amp;quot;&amp;gt;
    &amp;lt;div class=&amp;quot;node-inner&amp;quot;&amp;gt;...

  • Assign HTML character entities

    Hello,
    I have a scenario where a message should be sent to an HTTP server using the HTTP receiver CC. In the message itself no special HTML characters such as <, > or / should be used but they should be replaced with special character entities such as &lt for < .
    Is there an easy way to do this as it is quite a common requirement? Is there an adapter module available for this or must this be done in the mapping itself?
    Thank you for your advice.
    Edited by: Florian Guppenberger on Aug 11, 2009 6:54 PM
    Edited by: Florian Guppenberger on Aug 11, 2009 6:55 PM

    > public void execute(InputStream in, OutputStream out)
    >           throws StreamTransformationException {
    > try{   
    > int c;
    >     while ((c = in.read()) != -1) {
    >       switch (c){      
    >          case '&': out.write("&amp ;".getBytes()); break;   
    >          case '&lt;': out.write("&lt ;".getBytes()); break;
    >          case '>': out.write("&gt ;".getBytes()); break;
    >          default: out.write(c);
    >        }
    >
    >     }
    >   } catch (IOException e) {
    >     throw new StreamTransformationException(e.getMessage());
    >   }
    >
    >
    > }
    The SDN forum does not allow html escape sequences, so I put a space before the ; which you have to remove in your code.
    ' and " need not to be escaped, so I removed that lines.
    Edited by: Stefan Grube on Aug 16, 2009 11:06 PM

  • Replacing text that contain :, [ in a file with powershell

    So we have recent come across a situation where we need to replace a line of text in a txt file (config file). We have the following PS code, it opens the file, appears to process the command, closes and saves the file (at least the time stamp has updated).
    $old = ' "enabled_labs_experiments": [ ],'
    $new = ' "enabled_labs_experiments": [ "disable-direct-write" ],'
    (Get-Content "C:\Users\Jesse\AppData\Local\Google\Chrome\User Data\Local State – Copy") | ForEach-Object {$_ -replace $old, $new} | Set-Content "C:\Users\Jesse\AppData\Local\Google\Chrome\User Data\Local State – Copy"
    We do not need the variables but we did it that way instead of inline so that we could more easily see what we are changing.
    Basically nothing gets updated in this file. There are other places in this same file that we can update the code and it works perfectly so I have a feeling that it has to do with the [ ] or the : or some other character that PS uses. Unfortunately we cannot
    omit the : or the [ ] due to that being exactly what we need to change in the file.
    The following works perfectly
    $old="USA"
    $new="en"
    (Get-Content "C:\Users\Jesse\AppData\Local\Google\Chrome\User Data\Local State") | ForEach-Object {$_ -replace $old, $new} | Set-Content "C:\Users\Jesse\AppData\Local\Google\Chrome\User Data\Local State"
    Any suggestions are greatly appreciated!!

    You might be able to make use of [regex]::Escape() to automatically make those characters literal when being read in regex by escaping them.
    Not tested:
    $old = [regex]::Escape(' "enabled_labs_experiments": [ ],')
    $new = ' "enabled_labs_experiments": [ "disable-direct-write" ],'
    (Get-Content "C:\Users\Jesse\AppData\Local\Google\Chrome\User Data\Local State – Copy") | ForEach-Object {
    $_ -replace $old, $new
    } | Set-Content "C:\Users\Jesse\AppData\Local\Google\Chrome\User Data\Local State – Copy"
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • SAXParseException when trying to parse a text that contains "&"

    Hi all again,
    now I have another problem parsing text...
    When I try to parse the next xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <areastate><identifier>AREA 01&&&hola</identifier>
    <code>1</code>
    <description>Area unica </description>
    <timestamp>1027058590958</timestamp>
    <activestrategy><identifier>ESTR 101</identifier>
    <description>Estrategia 1 del area 1</description>
    </activestrategy>
    <subarea><identifier>SUBA 101_asdfg</identifier>
    <description>Subarea 1 del area 1</description>
    <operationmode><timetable /></operationmode>
    <subareastreet><streetplan><plan>plan 91</plan>
    <forced><no/></forced>
    <ordered>plan 91</ordered>
    </streetplan><streetcycle><cycle>100</cycle>
    <forced><no/></forced>
    <ordered>100</ordered>
    </streetcycle>
    </subareastreet>
    <subareatimetable><plan>plan 91</plan>
    <cycle>100</cycle>
    </subareatimetable>
    <subareaselection><plan>--</plan>
    <cycle></cycle>
    </subareaselection>
    <subareaadaptative><cycle></cycle>
    </subareaadaptative>
    </subarea>
    </areastate>
    I get this exception :
    org.apache.crimson.parser/P-009
    org.xml.sax.SAXParseException: org.apache.crimson.parser/P-009
         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3035)
         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3023)
         at org.apache.crimson.parser.Parser2.maybeReferenceInContent(Parser2.java:2296)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1754)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
         at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
         at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:499)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:304)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
         at com.saincotrafico.optimus.client.gui.realtime.XMLListener.creaObjeto(XMLListener.java:109)
         at com.saincotrafico.optimus.client.gui.realtime.XMLListener.onMessage(XMLListener.java:63)
         at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:490)
         at java.lang.Thread.run(Thread.java:484)
    I've noticed that this only happens if one of the values between to tags have an '&'.
    Any ideas? Please it's VERY IMPORTANT as one client of ours has deicided to change identifier of the areas ant put some &&&s in the name. The client, my boss, an more people is hasten on me, and I have now no more ideas.

    You mean that I cannot parse something like
    <id>Daniel&Cia.</id>?
    If that's true I think I'm in a big problem...yes.
    but you can change to use CDATA.
    <![CDATA[<hello> &&&&&&&&&&&&&&&& </hello>]]>
    or change to
    <id>Daniel&#38;Cia.<id>

  • Trying to OCR pdf, pdf says it can't perform bc it already contains renderable text-but does not.

    I work for a large agency, and we receive PDF's all the time. 98% of the time I am able to OCR a document with no issues. Just recently I have come across this issue several times, and was wondering if anyone can solve this irritating problem!
    *Acrobat 8.1 - When going to OCR the document, I receive the following message " Acrobat could not perform recognition (OCR) on this page because this page already contains renderable text. However, it does not. When you go to select text or search for anything the whole page is selected (like it's still in a "picture" format, not a document format that you can search, ect.)
    I am not sure if it is how the document is uploaded originally by the other party that causes this, but the only thing I can do as a work-around - is to print out the entire document, scan and then I can OCR the document just fine! The problem is, if the document is 400 pages or so, this can be a huge waste of time, and money just to be able to search the PDF.
    *I have also checked the pdf properties to see if this is some sort of permissions issue, and there are not permissions/security settings in place.*
    PLEASE HELP! Any assistance in this matter would save me a lot of time, and of course (my sanity!).
    Thank you in advance!

    While the alert speaks to "renderable text" that is a simplification. The issue is that you've PDF page content consisting of at least one renderable "character".
    Look at font families - you will observe that there are many characters that are not "text" characters (i.e., linguistic characters).
    So, there's a "renderable character" present. It may be an alpha numeric that has a font color the same as the page background. It may be under the image and thus not visible to the eye.
    You might be able to determine just what is present.
    You could export the page of interest to a text file then view that file.
    You could deplay the page of interest in Acrobat Pro then select the "Content panel" to view the content tree.
    Locate and click on the page number for the page of interest.
    From the Content panel's Options menu select "Highlight Content".
    Walk down the tree. Select the content containers in turn and observe what is highlighted on the PDF page.
    Where might the renderable character come from ? Typically that'd be associated with something in the work flow.
    Not always easy to find so don't take anything in the work flow for granted.
    Be well...

  • Displaying an RTF document that contains images

    Hello,
    I am trying to display styled text that contains images. I thought the simplest way to do this was to save my documents as RTF documents, and display them through the JEditorPane. But, when the JEditorPane display the documents, the text is styled properly, but there are no images being drawn. Is the JEditorPane capable of displaying RTF files that contain images?
    My main objective is to display documents in Java that other people have created; so if there is some other small libraries that can do this. I would be interested. I need to display the documents in an applet, so I want the library to be small.
    Thanks
    Vance

    JEditorPane will render HTML and basic CSS with images.

  • Unable to send texts messages containing the letter é anywhere in the text

    I am unable to send ANY text that contains the character é as in Pokémon since January on my Droid Razr... prior to January it sent just fine, but the message just hangs in the 'sending' and NEVER gets sent!!! the recipient NEVER receives the text and it NEVER goes into failed status!!!! just hanging in 'sending' mode!!!! only does this on Verizon Wireless phone... so frustrating as my nerd friends like it and I prefer to type Pokémon rather than Pokemon!!!

    What happens when you try to send a message? If you get an error message,
    what is the exact complete wording of that message?
    Are you using iMessage or a 3rd party app?
    Is your account properly provisioned for messaging if using other than iMessage?

Maybe you are looking for

  • Problem in Pricing Formula

    Hi, For specifyic condition types, i need the condition values to be displayed always in 'INR', i have created a formula routine for this and assigned to my pricing procedure . structures i am changing are XKOMV and KOMK. using 'CONVERT_TO_LOCAL_CURR

  • Item display templates office 365 not showing in sharepoint designer

    Hi, I have an enterprise search site in O365. I can brows to Masterpage > Display Templates > Search in the browser and see the .html & .js file.  If I brows to the same location in SharePoint designer, the files do not display.  How do I see/edit th

  • Anyone knows how to set debug on in ADE 2.0 ?

    It used to be Ctrl Shift T in previous version Quite funny but if you run epubcheck on the welcome.epub which comes with ADE 2.0, it does not pass validation : ERROR: C:/Users/Alpha/Documents/My Digital Editions/welcome.epub: Length of the first file

  • Problem with specific service

    Not sure where to post this but here's the issue I am seeing: I use iLok, a security/license dongle for (mainly) audio based applications. It worked fine previously in W10TP but since 10041 it stopped working. I noticed the service it runs is not sta

  • GRID_CNTRL Exception coming from CL_GUI_ALV_GRID- Refresh_Table

    Hi I am using REUSE_ALV_GRID_DISPLAY for ALV grid Display with various secondary ALV . I have some editable fields in that and I need to refresh the screen I am able to get the ALV refreshed using CL_GUI_ALV_GRID->Refresh_Table . Problem: When I go t