• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.io.UTF Data Format Exception:

 
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all:
I got the java.io.UTFDataFormatException: Invalid byte 2 of 2-byte UTF-8 sequence while running my app.

my app would in- take an input xml file and then generate help files out of the xml file

now what i have been doing is copy and paste the help content from a WORD file into the xml file, not a GOOD idea i know..

so i am thinking that is why i got the java.io.UTFDataFormatException: Invalid byte 2 of 2-byte UTF-8 error...because by default the XML parser accepts UTF-8 formatting.

I am just wondering if i am copy and paste from word, is there an XML editor outthere that would get rid of the illegal chars from WORD for me automatically?

Please let me know..


Many thanks
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you save the file in Unicode ?
reply
    Bookmark Topic Watch Topic
  • New Topic