cffile read and special characters
I moved code from ColdFusion2016 (Linux) to ColdFusion2023 (Windows). The database and network share behind the website are identical.
I am using cffile read to read a file in a network share. The website on the CF16 server can read the file and displays as expected. The website (same code) on the CF23 server is unable to read the file and throws and error.
This is the value in our database that sits behind both CF16 & CF23 code 'PLN_29886_ Istanbul SIOT DAY 1 - 1to1 Turkish Thank You — Triggered Email.htm'
On the network drive the filename is displayed as 'PLN_29886_ Istanbul SIOT DAY 1 - 1to1 Turkish Thank You â” Triggered Email.htm'
I do not have any control over the filenames that are placed into the network share.
I can see that the em-dash is translated into â” in the file. I'm at a loss as to why cffile on CF16 reads the file but cffile on CF23 an error is thrown. I would expect the same result either they both read the file or they both throw and error. I assume that there was some change to CF or cffile that will cause this behavior but I cannot seem to find out what. I looked at the documentation and didn't find a clue. I also looked at the CF Administrator trying to see there is anything in there that need to be added/changed/checked.
ERROR MESSAGE
An error occurred when performing a file operation read on file //hoover/sim_client/invite_uploads/PLN_29886_ Istanbul SIOT DAY 1 - 1to1 Turkish Thank You — Triggered Email.htm.
The cause of this exception was: java.io.FileNotFoundException: //hoover/sim_client/invite_uploads/PLN_29886_ Istanbul SIOT DAY 1 - 1to1 Turkish Thank You — Triggered Email.htm (The system cannot find the file specified).
The error occurred in //nagennas02/ColdFusion2023/mdocfprod/invites-app/invites/showinvite.cfm: line 42
40 :
41 : <cffile action = "read"
42 : file = "\\hoover\sim_client\invite_uploads\#getInviteData.ServerAttFile1#"
43 : variable = "inviteFile" >
44 : <p>
Has anyone else had an issue like this?
TIA,
Jennifer
