paulcwarren/spring-content

File download not working on windows platform

planzonevi opened this issue · 1 comments

Hello

The following line will cause an IllegalArgumentException when trying to download files from Windows platform.

ContentDisposition.Builder builder = ContentDisposition.builder("form-data").name( "attachment").filename((String)originalFileName, Charset.defaultCharset());

Windows uses windows-1252 as default charset which is not compliant to rfc 5987
I suggest to force UTF-8 or ISO-8859-1

Regards

Thanks @planzonevi , I'll look into this as soon as I can