Yiao SUN
Yiao SUN

Reputation: 978

Import an XMI file to a XML project Error : Invalid byte 1 of 1-byte utf-8 sequence

When I import my file XMI to my UML project (java project) I got a messege error

org.xml.sax.SAXParseException :  Invalid byte 1 of 1-byte utf-8 sequence.

In my file I used ANSI before, I rewrite in the file XMI.

I have no idea what's happened, someone could help me ?

Upvotes: 0

Views: 127

Answers (1)

Thomas Fritsch
Thomas Fritsch

Reputation: 10127

If your XML file is not UTF-8 encoded, then you need an XML declaration as first line giving the actual encoding. For example

<?xml version="1.0" encoding="ISO-8859-1"?>  

Upvotes: 1

Related Questions