tracker issue : CF-4184113

select a category, or use search below
(searches all categories and all time range)
Title:

FileExists() returns incorrect value on files with some Unicode filename

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Henry Ho / Henry Ho (Henry Ho)

Created: 08/25/2016

Components: File Management

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win All

Vote Count: 0

Problem Description:

FileExists fail on files with some Unicode filename

Steps to Reproduce:

1. create a file "F:\in?aat?.jpg"

<cfoutput>#fileExists("F:\in?aat?.jpg")#</cfoutput>
<cfdirectory action="list" directory="F:\" name="dirContent" listinfo="all" filter="*.jpg">
<cfdump var="#dirContent#" format="text"> 

Actual Result:

NO
query
[Record # 1] 
Name: in?aat?.jpg


Expected Result:

YES
query
[Record # 1] 
Name: in?aat?.jpg


Any Workarounds:

create a UDF that uses <cfdirectory filter="in?aat?.jpg"> and use that instead

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4184113

External Customer Info:
External Company:  
External Customer Name: Henry Ho
External Customer Email:  
External Test Config: My Hardware and Environment details:

Attachments:

Comments:

Cannot read that file neither. An error occurred when performing a file operation read on file C:/ColdFusion11/cfusion/runtime/work/Catalina/localhost/tmp/in?aat?.jpg. The cause of this exception was: java.io.FileNotFoundException: C:/ColdFusion11/cfusion/runtime/work/Catalina/localhost/tmp/in?aat?.jpg (The system cannot find the file specified). The error occurred in 49 : <cffile action="read" file="inşaatı.jpg" variable="x" >
Comment by External U.
1953 | August 25, 2016 07:33:06 PM GMT
Henry, I tried the code you shared and its working fine . Coldfusion returns correct values for unicode filename. Could you please tell me CF11 update version you are trying? I am attaching a code snippet that worked fine for me. PFA. Place the attachement in Cf web root and run the CF-4184113.cfm file.Here is the output I received. YES query [Record # 1] Attributes: [empty string] DateLastModified: 08/26/2016 10:39:23 AM Directory: C:\ColdFusion11\cfusion\wwwroot\CF-4184113 Link: NO Mode: [empty string] Name: 1.jpg Size: 0 Type: File [Record # 2] Attributes: [empty string] DateLastModified: 08/26/2016 10:30:34 AM Directory: C:\ColdFusion11\cfusion\wwwroot\CF-4184113 Link: NO Mode: [empty string] Name: in?aat?.jpg Size: 0 Type: File
Comment by Poonam J.
1954 | August 26, 2016 12:39:43 AM GMT
I cannot reproduce today neither. Sorry for the trouble, please close this tix. Thanks.
Comment by External U.
1955 | August 26, 2016 02:07:58 PM GMT
Thanks Henry.No issues. Closing this track
Comment by Poonam J.
1956 | August 26, 2016 10:54:27 PM GMT