docbook-apps

RE: [docbook-apps] nbsp symbols in XHTML output

  • 1.  RE: [docbook-apps] nbsp symbols in XHTML output

    Posted 01-14-2009 17:42
    Hi Lillian,

    This problem arises because of a character encoding mismatch somewhere in the chain of the web server that's serving the file, the character encoding of the file itself, and the browser displaying the file.

    For a temporary fix in IE 7, invoke Page > Encoding and switch from "Western European (ISO)" to "Unicode (UTF-8)". Voila, the symbols all disappear. You don't see the problem in Firefox because it does a better job of autodetecting the character encoding of the HTML it parses and tries to display.

    Long term solutions are tricky. You probably won't have much luck asking all your readers to switch to Firefox, or to set IE to better autodetect. And be aware that when using the file:// protocol instead of http:// (such as when previewing the same DocBook-generated files from a local or network disk), both browsers do a better job of autodetecting, so you don't see the problem.

    The mismatch arises when a web server is configured to display all files in a particular encoding, but is then given files to display that were generated in a different encoding. Browsers such as IE believe the server's overall setting, not the HTML file content. It sounds like your company's web server is configured to send all files in ISO-8859-1 or Windows-1250 encoding, but you're producing DocBook-generated files with UTF-8 encoding.

    In this case, the solutions are:

    *
    Set your XSL to generate XHTML with the same character encoding as the web server.
    *
    Convince your company's webmaster that UTF-8 is the modern way to go, and have the web server reconfigured to send UTF-8 encoded files by default.

    Good luck!



    ________________________________

    From: Lillian Sullam [mailto:lsullam@bruxton.com]
    Sent: Wednesday, January 14, 2009 11:49 AM
    To: docbook-apps@lists.oasis-open.org
    Subject: [docbook-apps] nbsp symbols in XHTML output


    I am writing documentation using object oriented tags for lists of classes and methods. In the XHTML output in Internet Explorer, all of the areas where there are   or   in the XSLT appear as the following symbol, . This does not happen in Firefox. Is this a common problem? Is there an easy solution to remove the symbols? I am using DocBook 5.0, Saxon, XEP. Any advice would be greatly appreciated!

    Lillian