xml editor

Products

Features

  EPUB
Supported platforms

Supports Windows 7 & Mac OS X Lion

Ready for XML Editor data server software
W3C Member

XML to UTF-8

Questions about XML that are not covered by the other forums should go here.

XML to UTF-8

Postby srr » Sat Jan 03, 2009 12:02 am

I have a client that is saying that my xml is not utf-8 and I am not sure how to check or validate that it is or is not.

At the top of the header I have

<?xml version="1.0" encoding="utf-8"?>
<RECIPES xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:///c:/nobackup/Recipe.xsd">
<RECIPE RECIPEID="2" TITLE="Escargots Red Lion" TTIME="60" CONVENIENCE="Gourmet" IMAGE="2.jpg" COURSE="Appetizers">
<INGS>

Does that not declare it UTF-8 and when I validate should it not notify me that is that it is not UTF-8 if that is the case?
srr
 
Posts: 1
Joined: Fri Jan 02, 2009 11:58 pm

Re: XML to UTF-8

Postby sorin » Mon Jan 05, 2009 1:58 pm

Hello,

srr wrote:Does that not declare it UTF-8 and when I validate should it not notify me that is that it is not UTF-8 if that is the case?


Yes, the declaration

Code: Select all
<?xml version="1.0" encoding="utf-8"?>


specifies that the files uses the UTF-8 encoding. You can check that by reading the file with an XML parser from a command line or from an XML editor tool.

For example Oxygen reports such a problem when you open the file from menu File -> Open. If Oxygen does not report any encoding problem when you open the file then the file content stored in that file on disk can be decoded without problems to text characters using the UTF-8 encoding.


Regards,
Sorin
sorin
 
Posts: 3228
Joined: Fri Mar 28, 2003 2:12 pm


Return to General XML Questions

Who is online

Users browsing this forum: No registered users and 0 guests

XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>® XML Editor