Character encoding in multipart/form-data
Hi Ste-gr, I've tried your 1.5.0 RC2 and it's great! Finally Struts 1 in Jakarta EE9!
Only problem I have is with character encoding of text field in "multipart/form-data" forms, it's always ISO-8859-1, regardless of page encoding (I use UTF-8 everywhere). For the moment I've bypassed the problem adding the line:
factory.setCharset(Charset.forName(request.getCharacterEncoding()));
in "org.apache.struts.upload:CommonsMultipartRequestHandler" after:
DiskFileItemFactory.Builder factory = DiskFileItemFactory.builder();
Maybe there is a cleanest solution via configuration, but I didn't find it :(
Can you tell me if it's possible to do them via configuration or if it could be useful to add my modification (perhaps improved) in the next release?
Thanks
Ale
Hi @talp1,
thank you for your report. I'll have a look at it.
Greetings Stefan
@ste-gr We were experiencing the same problem with our application and did basically the same patch. It worked fine.
Hi @talp1 and @nyrygyk,
thank you for the hinds. I will try to correct this by the end of this week (01/09/2024).
Greetings Stefan
Hi Stefan, thank you for your effort to this great project, I look forward to your changes.
Ale