Xerces XMLSerializer And Character Entities

After struggling for hours trying to get the "portable" java transformation classes to output my DOM object to a file, I switched to Apache's XMLSerializer. The main problem I'd been having with the transform is that character entity references were maintained in the DOM tree, but kept getting resolved in the file (someone finally pointed me to a document stating that there is currently no way around this problem). The first time I tried using Apache's classes to write the DOM tree, it worked almost perfectly. The entity references actually showed up in the file; the only problem was a minor bug that caused notations to print wrong and make an invalid XML file(<!NOTATION tif SYSTEM 'tif'> became <!NOTATION SYSTEM 'tif'>). I downloaded Xerces 2.4.0 and the notation problem was fixed; unfortunately the character references are now being resolved AGAIN. I'm at the end of my rope....how can I prevent the XMLSerializer from converting references like &rarr; to bizarre utf-8 characters? Any help would be greatly appreciated.
Here's my code...
// xmlDocument - DOM Document object
// fileName - The name of the XML file to write to
OutputFormat format = new OutputFormat();
format.setLineSeparator( LineSeparator.Unix );
format.setIndenting( true );
format.setPreserveSpace( false );
XMLSerializer serializer = new XMLSerializer( new FileWriter( fileName ), format );
DOMSerializer ds = serializer.asDOMSerializer();
ds.serialize( xmlDocument );
P.S. - This exact code kept the references in the outputted XML file until I upgraded my xercesImpl.jar. I've also played with most of the methods on OutputFormat without any luck.

Here are a few snippets:
<!ENTITY rarr "#x30"> <!-- In our process this should NEVER be resolved -->
<value>Here is a character entity: &rarr;</value>
The rarr entity reference becoms an EntityReference object in the DOM tree, but after I run it through XMLSerializer the XML file looks like this:
<value>Here is a character entity: ?</value>

Similar Messages

  • 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;...

  • Handling Character Entities - Java Mapping Issue

    Hi Experts,
        I need to replace the character entities in my input XML. But, the problem is the java mapping I've written isn't replacing  the character entities as expected.  For example if my input XML  contains <NAME>&><XYZ</NAME>, then the ouput is <NAME>&amp:&gt:<0001&lt:/NAME>, whereas it should be <NAME>&amp:&gt:&lt:0001</NAME>.
    Note: I've used : instead of ; just to show it properly SDN.
    Can any of you share the code for the same if you've used it already?
    Thanks a lot in advance.
    Regards,
    Hussain.

    Hi Pooja,
        Thanks for your prompt reply.
    Are you trying to use the java mapping just to handle the character entities or your interface itself only has a java mapping?
                   - I'm using Java Mapping just to handle the character entities. Say my input XML looks like
    <?xml version="1.0" encoding="UTF-8"?>
    <resultset>
    <row>
    <ID>&<1</ID>
    <MESSAGE><![CDATA[<?xml version="1.0" encoding="UTF-8" ?><LGORT>&<0001</LGORT>]]></MESSAGE>
    </row>
    </resultset>
    I need to replace &< in <ID> to &amp:&lt: and similarly for CDATA <LGORT>&amp:&lt:0001</LGORT> before I process it in XI. In my java mapping I read the whole XML as string (line by line as mentioned below) and try to replace the character entities using some logic, which isn't working properly.
    StringBuffer buffer = new StringBuffer();
    BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "UTF-8"));
    for (String lineRead = reader.readLine(); lineRead != null; lineRead = reader.readLine()) {
           buffer.append(lineRead);
    I've also checked the thread mentioned by Srinivas. But, StringEscapeUtils.escapeXml() would replace all the character entities like &lt:?XML... , which would result in an invalid xml...
    Please suggest.
    Thanks,
    Hussain.

  • 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. &uuml; 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.

  • 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

  • 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.

  • Displaying Numeric Character Entities

    I�m having a problem displaying numeric character entities such as ��� (m-dash) in my Java application. I have noticed that some characters will show up correctly and some will not, for example �}� (Right curly brace) shows up just fine. I�m having the same problem with Japanese numeric character entities such as �&#24335;�. The encoding that is being used here is UTF-8.
    I am reading the text that contains these entities from a XML file using the following code:
        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
        dbf.setNamespaceAware(true);
        dbf.setIgnoringComments(true);
        dbf.setIgnoringElementContentWhitespace(true);
        try {
          FileInputStream fff = new FileInputStream(theFile);
          InputSource inSource = new InputSource(new InputStreamReader(fff,"UTF-8"));
          DocumentBuilder db = dbf.newDocumentBuilder();
          Document doc = db.parse(inSource);
        } catch (Exception e) {
          System.out.println("Exception: " + e);
        }Here is a simple example of an xml file.
    <?xml version="1.0" encoding="UTF-8"?>
    <toc name="Course One" file="course1/toc.xml">
    <topic name="Topic � One" file="course1/source/topic1.html"/>
    <topic name="&#24335; (Japanese char)" file="course1/source/topic2.html"/>
    </toc>When I print out the contents of the name attribute I get boxes (or a ?) in place of the character entity. Any help that can be offered here would be greatly appreciated.
    Thanks,
    David

    I just realized that the entities that I put in my post were resolved by the browser, so they didn't show up as the actual numeric entity code as I intended, &#151; (& + #151;) for m-dash &#125; (& + #125;) for the curly brace and &#24335; (& + #24335;) for the Japanese character. The XML file looks like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <toc name="Course One" file="course1/toc.xml">
    <topic name="Topic &#151; One" file="course1/source/topic1.html"/>
    <topic name="&#24335; (Japanese char)" file="course1/source/topic2.html"/>
    </toc>

  • Character Entities - too SMALL

    Is there any way to change the font size for the drop down
    help menu when typing character entities? I have tried changing the
    code view point size but the help menu remains the same size no
    matter what...
    Just to clarify, I am not asking how to change the point size
    of the document - just the drop down dialog box that allows you to
    chose which character entity you want to select.
    Thanks!

    > Is there anyone from Adobe that actually responds to
    these posts?? My
    > original
    > question had to do with the preferences in Dreamweaver,
    not hacking away
    > through my system preferences.
    Rarely. This is a user to user forum, not an official
    communication link to
    Adobe.
    If you need to communicate directly with Adobe, you would
    have to contact
    them directly.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "eperkins21" <[email protected]> wrote in
    message
    news:g6o1f8$peu$[email protected]..
    > Is there anyone from Adobe that actually responds to
    these posts?? My
    > original
    > question had to do with the preferences in Dreamweaver,
    not hacking away
    > through my system preferences.
    >
    > So, thanks *ACE* but unless you know exactly how to
    answer the question
    > using
    > the system preferences, that post is of no help.
    >
    > I find it hard to believe that you can change the font
    size of the
    > document
    > for those who may be visually impaired yet the drop down
    character entity
    > help
    > list remains around 8 points and can not be modified
    without going to
    > "system
    > preferences".
    >
    > How about someone from Adobe actually help out here...
    >
    > Thanks.
    >

  • List of ADE supported character entities?

    Is there a list of all the XHTML character entities supported in Adobe Digital Editions? I have an .epub book of poetry that uses a lot of &#8195; (em spaces) which just render as a question mark (?) in ADE. Trying to figure out my options, but surprisingly, can't seem to find a source.

    @TM1970, I ended up making a sample EPUB with various characters and typle styles that I could then upload into ADE and other readers to test the rendering. I posted it on our website if you'd like to download it at: http://www.holartbooks.com/documents/miscellaneous/EPUBStyleGuide.epub But basically, ADE seemed to support everything but the three spaces -- thin space, en space, em space. Hope that helps.

  • Running the report in Bitmap and Character mode

    Hi,
    We have the reports which can run in both the character mode and Bitmap mode. The only problem I'm facing is font size in the character mode report. If the report is run in Character mode then the font size of the report will be greater. As the sizer is bigger, I'm getting the X symbol in the place of report. Can i reduce the size of the font. I'm using the font Tahoma (8 points). Reports 6i Version and Windows Xp is the OS.
    Regards,
    Alok Dubey

    Hi this may solve u'r problem
    In Oracle Reports Designer, bitmap mode, you can make "C"
    bold and in a different font and point size than "c". This
    is because you are generating postscript output.
    Postscript is a universal printer language and any
    postscript printer is able to interpret your different
    design instructions.
    In Oracle Reports Designer, character mode, the
    APPLICATIONS STANDARDS REQUIRE the report to be designed in
    ONE FONT/ ONE CHARACTER SIZE. Character mode reports
    generate ASCII output. In ASCII you cannot dynamically
    change the font and character size. The standard is in
    effect so a report prints as identically as possible from
    both conventional and postscript printers.
    by....
    stanma

  • Script needed to generate a list of paragraph and character styles from the Book Level

    Hello,
    I am using FrameMaker 11 in the Adobe Technical Communication Suite 4 and I need to find a script that will generate a list
    of paragraph and character styles from the book level.
    I am working with unstructured FrameMaker books, but will soon be looking at getting a conversion table developed
    that will allow me to migrate all my data over to Dita (1.1 for now).
    Any thoughts, ideas on this is very much appreciated.
    Regards,
    Jim

    Hi Jim,
    I think the problem you are having with getting a response is that you are asking someone to write a script for you. Normally, you would have to pay someone for this, as it is something that folks do for a living.
    Nonetheless, I had a few minutes to spare, so I worked up the following script that I believe does the job. It is very slow, clunky, and totally non-elegant, but I think it works. It leverages the book error log mechanism which is built in and accessible by scripts, but is spendidly unattractive. I hope this gives you a starting point. It could be made much more beautiful, of course, but such would take lots more time.
    Russ
    ListAllFormatsInBook()
    function ListAllFormatsInBook()
        var doc, path, fmt;
        var book = app.ActiveBook;
        if(!book.ObjectValid()) book = app.FirstOpenBook;
        if(!book.ObjectValid())
            alert("No book window is active. Cannot continue.");
            return;
        CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
        CallErrorLog(book, 0, 0, "** Book format report for:");
        CallErrorLog(book, 0, 0, book.Name);
        var comp = book.FirstComponentInBook;
        while(comp.ObjectValid())
            path = comp.Name;
            doc = SimpleOpen (path, false);
            if(doc.ObjectValid())
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, doc, 0, "");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "Paragraph formats:");
                fmt = doc.FirstPgfFmtInDoc;
                while(fmt.ObjectValid())
                    CallErrorLog(book, 0, 0, "  - " + fmt.Name);
                    fmt = fmt.NextPgfFmtInDoc;
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "Character formats:");
                fmt = doc.FirstCharFmtInDoc;
                while(fmt.ObjectValid())
                    CallErrorLog(book, 0, 0, "  - " + fmt.Name);
                    fmt = fmt.NextCharFmtInDoc;
            else
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
                CallErrorLog(book, 0, 0, "!!!  Could not open: " + comp.Name + " !!!");
                CallErrorLog(book, 0, 0, "-----------------------------------------------------------");
            comp = comp.NextComponentInBook;
    function CallErrorLog(book, doc, object, text)
        var arg;
        arg = "log ";
        if(book == null || book == 0 || !book.ObjectValid())
            arg += "-b=0 ";
        else arg += "-b=" + book.id + " ";
        if(doc == null || doc == 0 || !doc.ObjectValid())
            arg += "-d=0 ";
        else arg += "-d=" + doc.id + " ";
        if(object == null || object == 0 || !object.ObjectValid())
            arg += "-O=0 ";
        else arg += "-O=" + object.id + " ";
        arg += "--" + text;
        CallClient("BookErrorLog", arg);

  • [JS InDesign CS3] Style groups, begone! (or: How do I take paragraph and character styles out of style groups?)

    Sorry for this question (and my terrible English, by the way), I'm a javascript noob and I know when I've reached my limits.
    Well, I'm trying to take a set of paragraph and character styles out of the style groups they are placed in, in hundreds of InDesign documents (that cannot be treated as a book). As far as I've tried (thanks to the invaluable help of previous posts in this forum) I've been able to move a style into a group and change it's position inside the group, inside the root level or even between groups. But it doesn't matter how I try, I don't know which move reference should I try in case I want to take every style out of their style group and place them after their original group folder, at the [Root] style level .
    I have tried:
    var doc=app.activeDocument;
    var pGroups=doc.paragraphStyleGroups;
    for (i=pGroups.length-1; i>=0; i--){
         var pStylesInGroup=pGroups[i].paragraphStyles;
         for (j=pStylesInGroup.length-1; j>=0; j--){
    // Here I am, trying to move a style outside the folder that contains it, and failing miserably.
              pStylesInGroup[j].move (LocationOptions.after, pGroups[i]);
    It didn't work, the script sent an invalid parameter value in the reference field, so I cant use the group folder itself as reference.
    Tried other (obviously wrong) solutions, like use the first available style as reference. Therefore, my second script was
    var doc=app.activeDocument;
    var pStyles=doc.allParagraphStyles;
    var pGroups=doc.paragraphStyleGroups;
    for (i=pGroups.length-1; i>=0; i--){
         var pStylesInGroup=pGroups[i].paragraphStyles;
         for (j=pStylesInGroup.length-1; j>=0; j--){
    // Now I try placing the styles after the [Basic Paragraph], that is, the second paragraph style in the document style list
              pStylesInGroup[j].move (LocationOptions.after, pStyles[1]);
    It didn't work either, another invalid parameter in the reference field. Similar results with my other attempts (I even tried "[Root]" as literal with similar luck).
    So, my question is: Which command (or script, in case my whole approach is utterly wrong) should I use to achieve my goal?
    Thanks in advance to whoever decides to spend more than a minute thinking about my humble worries, and my apologies for shamelessly ripping some of your lines of code for my purposes.

    Okay, tried a few things and got really weird results!
    1. You can move a style around inside its group.
    2. You can move a style out of a group "to" another, but it will appear 'inside' that style. I got my test style as a sub-item of [Basic Paragraph], using index #1. With index #0 ([No Paragraph Style]) InDesign crashed.
    3. You can duplicate the style, but then you get a copy in the same group. Still no luck.
    4. Finally! What is the parent of a paragraph style?
    Document | Application | ParagraphStyleGroup
    "Application" is easy -- that's when you make a style global. So what's the difference between 'Document' and 'paragraphStyleGroup'? Simple -- well, when you finally get it...
    pStylesInGroup[j].move (LocationOptions.AT_END, doc);
    moves the style out of the group and to the end of the list in the document. I don't think it's possible to move it directly to a specific position into the main style list -- you first have to move it out of a group, then move it around in its own list.
    Fortunately, it returns its new position as a ParagraphStyle again, so if needed, you can use
    newStyle = pStylesInGroup[j].move (LocationOptions.AT_END, doc);
    newStyle.move (LocationOptions.AFTER, pStyles[1]);
    -- I didn't really try that out, but it should work.

  • What versions of Xerces-J and Xalan-J does JDK 1.5 make use of

    Can any one tell me what versions of Xerces-J and Xalan-J does JDK 1.5 make use of.

    Hi all,
    I have a class which has a Vector<Vector> data
    member.
    I expect its collection to contain more collections
    hence the Vector<Vector> type.Everything is OK with your concept, except that you just declared a variable of type "Vector of Vectors". Instead, you need to declare it as "Vector of Vector of Objects":
    private Vector<Vector<Object>> coll;and initialize it with
    coll= new Vector<Vector<Object>>();

  • JSF and Character Sets (UTF-8)

    Hi all,
    This question might have been asked before, but I'm going to ask it anyway because I'm completely puzzled by how this works in JSF.
    Let's begin with the basics, I have an application running on an OC4J servlet container, and am using JSF 1.1 (MyFaces). The problems I am having with this setup, is that it seems that the character encodings I want the server/client to use are not coming across correctly. I'm trying to enforce the application to be UTF-8, but after the response is rendered to my client, I've magically been reverted to ISO-8859-1, which is the main character set for the netherlands. However, I'm building the application to support proper internationalization; which means I NEED to use UTF-8.
    I've executed the following steps to reach this goal:
    - All JSP files contain page directives, noting the character set:
    <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>I've checked the generated source that comes from the JSP's, it looks as expected.
    - I've created a servlet filter to set the character set directly on the request and response objects:
        public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
            // Set the characterencoding for the request and response streams.
            req.setCharacterEncoding("UTF-8");
            res.setContentType("text/html; charset=UTF-8");       
            // Complete (continue) the processing chain.
            chain.doFilter(req, res); 
        }I've debugged the code, and this works fine, except for where JSF comes in. If I use the above situation, without going through JSF, my pages come back UTF-8. When I go through JSF, my pages come back as ISO-8859-1. I'm baffled as to what is causing this. On several forums, writing a filter was proposed as the solution, however this doesn't do it for me.
    It looks like somewhere internally in JSF the character set is changed to ISO. I've been through the sources, and I've found several pieces of code that support that theory. I've seen portions of code where the character set for the response is set to that of the request. Which in my case coming from a dutch system, will be ISO.
    How can this be prevented? Can anyone give some good insight on the inner workings of JSF with regards to character sets in specific? Could this be a servlet container problem?
    Many thanks in advance for your assistance,
    Jarno

    Jarno,
    I've been investigating JSF and character encodings a bit this weekend. And I have to say it's more than a little confusing. But I may have a little insight as to what's going on here.
    I have a post here:
    http://forum.java.sun.com/thread.jspa?threadID=725929&tstart=45
    where I have a number of open questions regarding JSF 1.2's intended handling of character encodings. Please feel free to comment, as you're clearly struggling with some of the same questions I have.
    In MyFaces JSF 1.1 and JSF-RI 1.2 the handling appears to be dependent on the raw Content-Type header. Looking at the MyFaces implementation here -
    http://svn.apache.org/repos/asf/myfaces/legacy/tags/JSF_1_1_started/src/myfaces/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java
    (which I'm not sure is the correct code, but it's the best I've found) it looks like the raw header Content-Type header is being parsed in handleCharacterEncoding. The resulting value (if not null) is used to set the request character encoding.
    The JSF-RI 1.2 code is similar - calculateCharacterEncoding(FacesContext) in ViewHandler appears to parse the raw header, as opposed to using the CharacterEncoding getter on ServletRequest. This is understandable, as this code should be able to handle PortletRequests as well as ServletRequests. And PortletRequests don't have set/getCharacterEncoding methods.
    My first thought is that calling setCharacterEncoding on the request in the filter may not update the raw Content-Type header. (I haven't checked if this is the case) If it doesn't, then the raw header may be getting reparsed and the request encoding getting reset in the ViewHandler. I'd suggest that you check the state of the Content-Type header before and after your call to req.setCharacterEncoding('UTF-8"). If the header charset value is unset or unchanged after this call, you may want to update it manually in your Filter.
    If that doesn't work, I'd suggest writing a simple ViewHandler which prints out the request's character encoding and the value of the Content-Type header to your logs before and after the calls to the underlying ViewHandler for each major method (i.e. renderView, etc.)
    Not sure if that's helpful, but it's my best advice based on the understanding I've reached to date. And I definitely agree - documentation on this point appears to be lacking. Good luck
    Regards,
    Peter

  • Changing fonts in paragraph and character styles (AppleScript, Grep or JavaScript)

    I have been trying the javascripts in this discussion:
    Adobe Community: Specified font need to be changed in all paragraph styles
    but I cannot get any of them to work. I have been putting them into CodeRunner then saving them into the InDesign Scripts folder but I have specific error messages for the ones I have tried. I am wondering if they actually solve my problem anyway, which is:
    Helvetica Neue LT seems to add another LT to its description thus: "Helvetica Neue LT LT 45" instead of just "Helvetica Neue LT 45".  InDesign does not recognise this and thus when I open each file I get a list of Fonts to be found. I have dozens of styles (Paragraph and Character) in dozens of files and have changed some of the styles manually - a laborious task. The styles must be changed otherwise I am still stuck with Helvetica Neue LT lurking away, waiting for the style to be applied. So I cannot use "Find font..." in the Type Menu.
    I am changing to "Helvetica Neue LT Std" with many faces: 35 Thin, 45 Light, 46 Light Italic, 65 Medium, 75 Bold...
    from the similar faces in Helvetica Neue LT. These currently display in the Styles Menu as [Helvetica Neue LT] [LT 45 Light]
    Sometimes when I change to Helvetica Neue LT Std manually the face sticks (even though I have changed it) so I have "Helvetical Neue Ltd Std [LT 45 Light]" and I have to go through the styles again and again. This is very tedious.
    So if anyone can help me with this problem I'd be eternally grateful.
    Using InDesign CS6, MacMini 2012, Mountain Lion (though I had the same problem in Lion)

    Hi James. Just a few threads down the list there is this: http://forums.adobe.com/thread/1198632?tstart=0
    Even the name of the thread is similar to yours.
    But first, you should do a bit of housecleaning in your font library. From your description it sound like a big mess.
    Do you use any font management tools? Most of the times they do more harm than good (but i am aware that it's a necessary evil for the most part).
    The fonts you are trying to use are in the font library or in the indesign document's folder?
    While Mac is a lot better than Windows in managing multiple fonts/font versions, it's also a lot more "fragile" if something goes wrong with a font.
    Try cleaning the font cache first:
    sudo atsutil databases -remove
    the restart the font server
    sudo atsutil server -shutdown
    sudo atsutil server -ping
    have a look here also:
    http://forums.adobe.com/thread/1201617?tstart=0

Maybe you are looking for

  • How can I find the total number of songs in my iTunes library?

    I just downloaded the new itunes.  In the previous itune library at the bottom of the screen it told me how many songs I have total.  Not just purchased, but how many total songs were in my library.  I liked knowing this because I could verify my ipo

  • Adobe Air install

    greetings i am trying to install Adobe Air required to work with a web design templete i'm working on a mac powerbook g4 with 1.67 mhz, 10.4.9 when i download, i get the .dmg file, and it says adobe air successfully installed but i can not locate the

  • Profit Center Substitution does not work in Invoicing of Service Orders

    Hi experts. While creating the Quotation (VA23) for Service Orders, the profit center field is populated with the correct profit center via substitution, but while creating the invoice, it is not being populated with any profit center, and hence this

  • Macbook Pro Lion 10.7.5

    I am at the Apple store right now. I brought in my Macbook Pro with Lion 10.7.5, to be reformatted.  It has been reformatted twice today by Apple Geniuses. Problem: With a grey burlaped/textured styled screen background, not a cloudy glass background

  • Setting offset in text variables

    Hi, I had a requirement to get the header values to be dynamically populated based on a value from the table. I need this value to be decremented locally for each and every column heading. Each column involves some calculations from RKFs . Is there a