This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

MultipartRequest getting java.io.IOException when setting UTF-16 in constructor  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings, i am getting an IOException ( java.io.IOException: Corrupt form data: premature ending ) when i make the following call when uploading a file

MultipartRequest requestMP = new MultipartRequest(request, uploadDir, maxSize, "UTF-16");

I've tried with different encodings like UTF-8 or ISO-8859-1 and it works, I believe there is a problem with this servlet and the encoding UTF-16, but i haven't found anything about it... does anybody know if this is a known issue??
 
Sheriff
Posts: 23965
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jesus, welcome to the Ranch!

I don't have any good suggestions, but here's a guess: perhaps you could specify UTF-16LE or UTF-16BE for the encoding, whichever is the right one?
 
Normally trees don't drive trucks. Does this tiny ad have a license?
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!