tracker issue : CF-4198841

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

[Linux] expandPath() encoding of filenames lost when using absolute path as argument

| View in Tracker

Status/Resolution/Reason: To Track//PRNeedInfo

Reporter/Name(from Bugbase): Sebastian Thomas / Sebastian Thomas ()

Created: 06/07/2017

Components: File Management

Versions: 2016,11.0,2018

Failure Type: Data Loss

Found In Build/Fixed In Build: 2016.0.04.302561 /

Priority/Frequency: Major / All users will encounter

Locale/System: ALL / Linux Red Hat 7.0

Vote Count: 5

Problem Description:
expandpath() loses UTF-8 encoding when using absolute path (starting with `/`) as argument. Encoding is kept when beginning the path with a `.` (dot).

Steps to Reproduce:
<cfdump var="#expandpath("/test-öäü.txt")#" />

Actual Result:

Expected Result:

Any Workarounds:



Pls fix this asap.
Vote by Simon R.
612 | June 08, 2017 12:12:42 PM GMT
Hi Sebastian, In Windows, jvm by default uses iso-8859-1 encoding in which the characters öäü are present. Whereas, In Linux we have to use the utf-8 encoding for these characters to work and the file needs to be saved using utf-8 encoding. <cfprocessingdirective pageencoding="utf-8"> <cfdump var="#expandpath("/test-öäü.txt")#" /> Thanks, Mukesh
Comment by Mukesh K.
609 | August 01, 2017 07:42:21 AM GMT
Hi Mukesh, that would make sense if expandpath() would behave the same for paths starting with "/" and paths not starting with "/". Example: <cfdump var="#expandpath("/test-öäü.txt")#" /> <!--- output: /path/to/test-???.txt ---> <cfdump var="#expandpath("test-öäü.txt")#" /> <!--- output: /path/to/test-öäü.txt ---> Could you investigate more please? Thanks, Sebastian
Comment by Sebastian T.
610 | August 01, 2017 09:03:58 AM GMT
Same behaviour with Build 2016.0.05.303689
Comment by Sebastian T.
611 | October 11, 2017 09:20:09 AM GMT
Hi Sebastian , I tried in build#2016,0,07,312270 and find the expected behavior : <cfprocessingdirective pageencoding="utf-8"> <cfdump var="#expandpath("/test-öäü.txt")#" /><br> <!--- output: /path/to/test-öäü.txt ---> <cfdump var="#expandpath("test-öäü.txt")#" /><br>  <!--- output: /path/to/test-öäü.txt ---> Please make sure the file has to be saved using utf-8 encoding. Can you please try on latest update and let us know .   Thanks, Mukesh  
Comment by Mukesh K.
30005 | December 05, 2018 09:58:45 AM GMT
Hi Sebastian, Did you chance to cross check it?   Regards, Mukesh
Comment by Mukesh K.
30489 | March 13, 2019 06:33:54 AM GMT
Hi Mukesh, I tried it with build#2016.0.10.314028 and it didn't work. Best regards, Kevin
Comment by Kevin T.
30515 | March 15, 2019 09:49:48 AM GMT