Copy link to clipboard
Copied
I'm moving to a new server running Coldfusion 2025 and have run into an issue when trying to load pages from the server that contain % encoded UTF-8 characters.
I get from pages with French characters in a folder/path, e.g. https://www.tourdulactemiscamingue.com/o%C3%B9dormir/, "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing)." Apache Tomcat/10.1.42
From pages in any folder, accented or not, like https://www.tourdulactemiscamingue.com/o%C3%B9dormir/g%C3%AEtes.cfm or https://www.tourdulactemiscamingue.com/quoifaire/activit%C3%A9saquatiques.cfm I get an error report from Coldfusion saying:
"File not found: /quoifaire/activitésaquatiques.cfm" (coldfusion.runtime.TemplateNotFoundException)
I've added:
1) <system.web>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" culture="en-US" uiCulture="en" />
</system.web> to the site web.config
2) uriEncoding=UTF-8 to isapi_redirect.properties
3) URIEncoding="UTF-8" relaxedQueryChars="[]" relaxedPathChars="[]" to my HTTP/1.1 connector in server.xml
None of these changes made any difference.
IIS logs show proper url encodings.
Is this a bug?
Rule out the Operating System. On searching the web, I found the following way to ensure that my Windows 10 has UTF-8 encoding:
"To set UTF-8 encoding in Windows 10, open Settings > Time & language > Language & region, click Administrative language settings, then Change system locale, and finally check the box for "Beta: Use Unicode UTF-8 for worldwide language support" before restarting your computer to apply the changes. This is a system-wide setting that affects how apps handle language data.
Copy link to clipboard
Copied
Hello Dan,
Can you please try adding below Java argument, restart cfusion instance and let us know if it works
-Dfile.encoding=UTF-8
Thanks & Regards
Ravi
Copy link to clipboard
Copied
Hi Ravi. Thanks for reaching out.
That made no difference.
Copy link to clipboard
Copied
Hi Ravi. Thanks for reaching out.
That made no difference.
By @Dan Good
Nevertheless, I would suggest that you continue to use the JVM flag -Dfile.encoding=UTF-8.
Suggestion: add the attribute URIEncoding="UTF-8" to the AJP connector (in \runtime\conf\server.xml), and then restart ColdFusion.
<Connector protocol="AJP/1.3" URIEncoding="UTF-8" ... etcetera... />
Copy link to clipboard
Copied
I left that in. Thanks.
My connector in server.xml no looks like:
<Connector packetSize="65535" protocol="AJP/1.3" URIEncoding="UTF-8" port="8024" redirectPort="8457" secret="14c40770-6507-4a1d-a745-4ba7d9578324" maxThreads="500" connectionTimeout="60000" tomcatAuthentication="false" />
This didn't restore page loads.
Copy link to clipboard
Copied
First, a question, just to clarify the context. You say you're moving to a new server running Coldfusion 2025. Is your previous server also running ColdFusion? If so, were there no such problems, and which ColdFusion version is it?
Next, yet another suggestion. I have just noticed that we missed one of the connectors. In \runtime\conf\server.xml, activate the org.apache.coyote.http11.Http11NioProtocol connector, add the attribute URIEncoding="UTF-8" to it, and then restart ColdFusion.
Examples (tailor the attributes to your own needs)
<Connector protocol="org.apache.coyote.http11.Http11NioProtocol" port="8443" maxThreads="500" SSLEnabled="true" scheme="https" secure="true">
<SSLHostConfig>
<Certificate certificateKeystoreFile="certificateFilePath" certificateKeystorePassword="certificatePassword" type="certificateAlgorithm" />
</SSLHostConfig>
</Connector>
<Connector protocol="org.apache.coyote.internal.http11.Http11NioProtocol" URIEncoding="UTF-8" port="443" maxThreads="500" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" />
I hope that does it. If not, we could then be thinking of using either (1) the IIS Rewrite Module, or (2) Application.cfc's onMissingTemplate. I prefer the second.
Copy link to clipboard
Copied
Morning. Its an old Coldfusion 2011 server. There were no problems with % encoded UTF-8 in the URL's.
I hope that I don't have to use IIS rewrite to english-names or accent-less folders and files. I'll read up on onMissingTemplate. In the meantime, if someone could copy an working coldfusion page over to say "activitéshivernales.cfm" and see if they have the same issue, that would be helpful.
I need to review how to configure the keystore. Are you aware of some current intructions on how to go about this?
Copy link to clipboard
Copied
Your insight is spot-on. I have just created a file named activitéshivernales.cfm in my ColdFusion 2025 project. It contains just one line of code:
<cfoutput>#now()#</cfoutput>
When I launch the page in the browser, it works as expected!
That means the ColdFusion version is probably not to blame.
Extra info: I am on Windows 10, and using ColdFusion's internal built-in (Tomcat) web server.
For information about configuring a keystore in ColdFusion, google coldfusion keystore.
Copy link to clipboard
Copied
I tested by turning on Developer Tools (F12 keboard key) and then pressing the F5 key to relaunch the CFM page. You will notice that the browser is the first to do the conversion from activitéshivernales.cfm to activit%C3%A9shivernales.cfm.
So, as we have assumed all along, it is up to the Tomcat server to translate the % encoded URI text back to activitéshivernales.cfm
Copy link to clipboard
Copied
Extra info:
the connectors (server.xml) in my installation don't even have URIEncoding="UTF-8". Also, I don't get any issues with activitéshivernales.cfm after I delete -Dfile.encoding=UTF-8 from jvm.config.
Copy link to clipboard
Copied
Rule out the Operating System. On searching the web, I found the following way to ensure that my Windows 10 has UTF-8 encoding:
"To set UTF-8 encoding in Windows 10, open Settings > Time & language > Language & region, click Administrative language settings, then Change system locale, and finally check the box for "Beta: Use Unicode UTF-8 for worldwide language support" before restarting your computer to apply the changes. This is a system-wide setting that affects how apps handle language data. "
Copy link to clipboard
Copied
That was it! Windows 2022 also has the same option: "Beta: Use Unicode UTF-8 for worldwide language support"
The pages are loading 😉
Thank you so much!
Copy link to clipboard
Copied
I'm running Windows 2022 Server and using Coldfusion's internal Tomcat server.
Before installing Coldfusion 2025 I uninstall an untested Coldfusion 2023 evaluation version that had little set-up. Something residual?
Something else, in catalina.properties I have: tomcat.util.http.parser.HttpParser.requestTargetAllow=%
I'll install the Coldfusion keystore later today and post on how it goes. I'm not confident about it given your easy use.
Copy link to clipboard
Copied
Folks, I can confirm that the Windows change that bkbk offered does solve this (with respect to serve the request through IIS--I found it was NOT needed if the request is served by the CF web server).
Indeed, I have still more details on all this if it may interest some readers.
To be clear, I've been working along with you both over the weekend, reading every post, creating the files and folders to recreate the problem, and trying every other tweak (all to no avail). I'd not yet written as I'd not yet found a solution. Even though the Windows change will solve the serving of the files via IIS, here's the additional detail:
Indeed, I realize that Dan will likley be satisfied with just the OS-level change. 🙂
And I'll understand if none of you may opt to reply to this. As I said, I simply wanted to offer the details because I had discerned them over hours of exploration the past couple of days. It seemed a very interesting challenge. I do still wonder if there may be more (and I may be forgetting to mention something else I'd observed), but I'll leave at it this for now.
But again, Dan, it seems you need not worry about the keystore at all. If you guys feel otherwise, do carry on. As always, just trying to help.
Copy link to clipboard
Copied
Hi Charlie. Thanks for those helpful details and note that 2018 and up has this issue. Its interesting that BKBK was able to load activitéshivernales.cfm without invoking the OS solution. Maybe its his version of CF?
I don't need public access to CF admin but thanks again for that shortcut now found in admin to enable the 443 connector. I didn't try activitéshivernales.html, why?
You're right 😉 I'm satisfied with the OS-level change and with it place undoing it for more testing. I can try that on another VM next month. I really appreciate you diving into this. If you find an answer that doesn't involve the OS beta feature I would be glad to hear about it.
Copy link to clipboard
Copied
Thanks for the update. As for why the page worked for bkbk before he discovered the OS change, I'll remind you that it worked for me also if the files were created within the cfusion/wwwroot. He may have tried that first.
Since I noticed you referred to using IIS, that's when I explored further--and had the problem there also.
As for the html page, are you asking why I mentioned it? Or why it would work while a cf page did not (until the OS change). I can't answer. I raised it for the sake of any exploring this further.
Understood on the rest.
Copy link to clipboard
Copied
The why was a retort on "why hadn't I tried that". Cheers! Dan
Find more inspiration, events, and resources on the new Adobe Community
Explore Now