Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaMail: File extension omitted by invoking part.getFileName  RSS feed

Ulrich Heeger
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone
I have a question: When I invoke the getFileName()-method on a part and the fileName contains ISO 8859-1 character set, then it might be that the file extension is omitted, when the fileName contains whitespaces.
Filename: Comments f�r test.doc
Result of part.getFileName():

Filename: Commentsf�rtest.doc
Result of part.getFileName():

Is this a bug? Do you know a workaround to get the filename with the file extension?

Thanks a lot in advance
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!