Leif Hanack opened SPR-12108 and commented
Hi there,
we encountered a problem using FormHttpMessageConverter when writing a multi part. Our use case is to create a multi part on the server side and send it to another service. The multi part contains a FileSystemResource and has a filename with German Umlaute (e.g. "Hallöle.png").
Unfortunately FormHttpMessageConverter.write uses getAsciiBytes. This seems to be W3C compliant.
Control names originally encoded in non-ASCII character sets may be encoded using the method outlined in [RFC2045]. (http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1)
We tried a couple of things even javax.mail.internet.MimeUtility.decode, but nothing worked for us.
We were only able to get it fixed when changing
name.getBytes("US-ASCII")
to
name.getBytes("UTF-8")
What would you recommend? How to deal with NON-ASCII characters?
Thanks a lot, Leif
Affects: 4.0.6
Issue Links:
Referenced from: commits 7f43f02, 9be0cf2
Leif Hanack opened SPR-12108 and commented
Hi there,
we encountered a problem using FormHttpMessageConverter when writing a multi part. Our use case is to create a multi part on the server side and send it to another service. The multi part contains a FileSystemResource and has a filename with German Umlaute (e.g. "Hallöle.png").
Unfortunately FormHttpMessageConverter.write uses getAsciiBytes. This seems to be W3C compliant.
We tried a couple of things even javax.mail.internet.MimeUtility.decode, but nothing worked for us.
We were only able to get it fixed when changing
name.getBytes("US-ASCII")
to
name.getBytes("UTF-8")
What would you recommend? How to deal with NON-ASCII characters?
Thanks a lot, Leif
Affects: 4.0.6
Issue Links:
Referenced from: commits 7f43f02, 9be0cf2