Validating UTF-8 Encoded Characters in XML Document

Posted on 2006-06-06
Last Modified: 2008-01-09

I have an XML document that is UTF-8 encoded and has the following string "week/xc2/x92s"  When I open this xml file in the Firefox browser, it ignores the UTF-8 encodings, and displays "weeks"  In Microsoft IE, it displays a box in between "week" and "s"  I think the author of the xml document intended to UTF-8 encode the single quote so that it reads "week's" but the UTF-8 encoding sequence is wrong.

I tried using the tool "xmlwf" to tell me if the xml document is valid or not, and it says that it is valid.  So, could this be an issue where the utf-8 encoding sequence is valid, but it is not an actual valid character/symbol?  So, xmlwf doesn't check for the validity of utf-8 characters?  Please let me know if I'm completely off track on this.  Is there an xml validator that will check for the validity of utf-8 characters?

Thanks for your time and help in advance.

Question by:Monica2003
    1 Comment
    LVL 1

    Accepted Solution


    Do you have an XML declaration in your file? When you have a XML declaration, it is supposed to override the content type information sent in the HTTP headers. So if your XML declaration is correct, the characters should be interpreted as you expect by the browser. For UTF-8, you should have:

    <?xml version="1.0" encoding="UTF-8"?>

    Also see this post about character encoding and browsers:

    I hope this helps,


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API ( has made its way into the popular lexicon of the English language.  A few years ago, …
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now