• 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

Invalid UTF-8 middle byte error..

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do any body know abt this error
java.io.CharConversionException: Invalid UTF-8 middle byte 0xdf (at char #451, byte #-1)
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Usually it means you're reading a document and assuming it's encoded in UTF-8 when it really isn't. And often that's caused by somebody writing the document in some encoding (which isn't UTF-8) and failing to declare that encoding on the document. Or worse, declaring the wrong encoding on the document.

Here's a link to a tutorial about XML and encodings: http://skew.org/xml/tutorial/
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Make sure to start you JVM with -Dfile.encoding=UTF-8. You JVM defaults to the operating system charset

read more here:

http://javagoogleappspot.blogspot.com/2018/06/if-you-are-getting-invalid-utf-8.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic