multipart/form-data with charset=UTF-8 causes file upload to fail in Lucee 7.0.0.202

OS: Windows Server 2022
Java Version: OpenJDK 21
Tomcat Version : 11.0.6
Lucee Version : 7.0.0.202


Hello everyone,

I’m encountering an issue with multipart/form-data encoding in Lucee 7.0.0.202.

Problem Description:

When using a file upload form, if I specify:

the file uploads successfully, but Turkish characters (such as “ş, ü, ğ, ı”) in text fields are corrupted.

To fix the character encoding issue, I updated the form to:

With this change, Turkish characters are correctly preserved — but file uploads stop working. The uploaded file fields seem empty or invalid on the server side.

Summary:

  • multipart/form-data → file upload OK, text broken :x:
  • multipart/form-data;charset=UTF-8 → text OK :white_check_mark:, file upload broken :x:

Question:

Is there a recommended way to properly support both:

  • UTF-8 encoded text fields,
  • and successful file uploadsin Lucee 7 (without manual low-level parsing)?

Or is this a known issue that may require a fix or workaround?

Tomcat is doing this

If you set enctype="multipart/form-data;charset=UTF-8" in your form, Tomcat 6 converts this to: content type: application/x-www-form-urlencoded , which is the problem.

let me see what I can do

I’ve re-opened your previous ticket

https://luceeserver.atlassian.net/browse/LDEV-5545