0

I am creating a web service in java in Domino that from a stream that represents a file and its name, a notes document is created, the stream is transformed into a file and attached to the document. The problem is that for name of files with accentuation occurs the truncation of letters with accentuation. I have tried several alternatives to handle this exception, but none have had the desired effect. Has anyone ever had this problem? The code snippet where the attachment is named follows.

header.setHeaderVal("attachment; filename=\""+nomeArq+"\"");
Marcus Loza
  • 185
  • 8
  • 1
    Take a look at the question and answers here: https://stackoverflow.com/questions/93551/how-to-encode-the-filename-parameter-of-content-disposition-header-in-http. Your question refers to a web service rather than an HTML page, and the question I linked is referring to a content-disposition header rather than an attachment header, but I believe the principles must be the same: You will probably have to use the % encoding for byte values and maybe use the *=UTF-8'' syntax. Since you are writing in Java, at least I don't think you need to worry about converting LMBCS to Unicode. – Richard Schwartz Jul 05 '17 at 00:03
  • I read the link, I tried the various tips, but I did not succeed. The context mentioned in the link governs somewhat the purpose, since the document with the attachment is seen through the client. I have chosen the alternative to replace the accented characters. – Marcus Loza Jul 05 '17 at 20:07

0 Answers0