Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Errors using Coldfusion 2025 on pages with URL's that contain % encoded UTF-8 characters

New Here ,
Aug 24, 2025 Aug 24, 2025

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?


658
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 25, 2025 Aug 25, 2025

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. 

...
Translate
Adobe Employee ,
Aug 24, 2025 Aug 24, 2025

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2025 Aug 24, 2025

Hi Ravi. Thanks for reaching out.
That made no difference.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 24, 2025 Aug 24, 2025
quote

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... />

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 24, 2025 Aug 24, 2025

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2025 Aug 25, 2025

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.

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 25, 2025 Aug 25, 2025

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2025 Aug 25, 2025

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!

BKBK_0-1756132702844.png

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2025 Aug 25, 2025

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.

BKBK_1-1756133866073.png

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 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2025 Aug 25, 2025

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2025 Aug 25, 2025

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. "
 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 25, 2025 Aug 25, 2025

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 25, 2025 Aug 25, 2025

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.



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2025 Aug 25, 2025

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:

 

  • The problem Dan reports (serving via IIS the CF pages with accented filenames) seems to have started with CF2018 and above. To be clear, I have all CF versions on the same machine, and even WITHOUT making the proposed Windows change, CF2016 and earlier had no trouble serving that file (and later Dan reported he'd previously been working with CF11). I'm doing all these tests on the same Windows 11 machine.
  • Again, the problem is unique to serving the requests through IIS. If one tried to make the request using the CF built-in web server (such as 8500, where by default it expects to find files defined in the cfusion/wwwroot), it worked for me--even on CF2025.
  • Regarding the connectors in the server.xml file, it may help to clarify that the "http" connector in server.xml (protocol="HTTP/1.1") manages that sort of request, while the "ajp" connector  (protocol="AJP/1.3") controls requests made through IIS (or Apache) when that web server connection has been created using the CF web server config (wsconfig) tool. FWIW, if one instead were to setup a forward to the built-in web web server (that 8500), then a request WOULD end up being served by that "http" connector instead. (That's possible in IIS if its ARR feature is implemented and enabled, or its a built-in option in Apache.)
  • Dan, you ask about setting up the keystore. To be clear, that discussion of the keystore only came up when bkbk offered an example of setting up another connector line for https (port="8443"), suggesting to you that it was "missing". FWIW, that connector line is indeed commented out by default in a normal CF install, and it has nothing to do with serving requests through IIS. It would primarily be enabled when one wants to serve the CF admin via https (CF2025 offers a checkbox to enable it in the CF Admin now). Anyway, I'm just pointing out that if your focus is serving your web site's pages via IIS, you don't "need" this connector line (or the keystore configuration for it).
  • Something related to all this: note that if instead you were to setup these files (whose names have accent characters) in the cfusion/wwwroot, you would STILL be able to "reach" them when making a URL request via IIS (even WITHOUT the Windows change). But that's a quirk of the CF web server connector: it's designed so that if the IIS request can't find the file in the IIS site root (or a subfolder, if indicated on the URL), the CF web server connector AUTOMATICALLY looks for the same file (or path/file) in the cfusion/wwwroot. Because the connector and CF get a 404 in trying to find the file in the IIS root, it finds it instead in the cf wwwroot. Of course, that's not a "solution" for this problem--but it's interesting to note.
  • That last point can also complicate testing! If one is not AWARE that it's happening, it could confuse their conclusions (it almost caught me). I changed the code (in that file) to output the CF function getbasetemplatepath(), and for good measure I also outputted the cgi variables script_name, cf_template_path and path_translated. Those confirmed what I proposed here. FWIW, one could also see that if enabling CF debugging output, but I realize Dan may not want to do that in production.
  • And if I then renamed the file in the cfusion/wwroot so that CF could not find it, and that's when it would go back to trying to actually find the file in the IIS site root...and it would fail with a 404, at least until applying this Windows change that BKBK offered. So again, that would seem the "solution"--as far as serving pages via IIS.
  • Though again the fact that it works ok on CF2016 and earlier without that, that does suggest that SOMETHING changed starting with CF2018.
  • And FWIW, I had confirmed that if I instead created an htm file with these french accents, IIS had no trouble serving them (even before the Windows change). And of course htm files are NOT processed by CF (they're not in the list of file extensions defined in the connector's uriworkermap.properties file, to be passed on to CF). That further confirms there's something in CF that changed, leading to all this.
  • And I raise that last point because some people may not WANT to make that OS-level change. They may wonder instead "what changed in CF2018? and why can't we undo that change somehow?"
  • I'm also pretty sure I did undo each change proposed here (in the server.xml, jvm.config, and isapi_redirect.properties), and things still worked as I discuss above (when serving via IIS the files only as found in the IIS root and its folders). And that was fixed only by the OS-level change. so thanks for that, bkbk!


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.


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 25, 2025 Aug 25, 2025

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2025 Aug 25, 2025

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. 


/Charlie (troubleshooter, carehart. org)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 25, 2025 Aug 25, 2025
LATEST

The why was a retort on "why hadn't I tried that". Cheers! Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources