[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Validating UTF-8 Encoded Characters in XML Document

Posted on 2006-06-06
Medium Priority
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

Accepted Solution

avernet earned 500 total points
ID: 17006227

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

873 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