简体   繁体   中英

phpseclib get is changing my file name and puts special characters

Im downloading files from sftp using phpseclib get method, but it adds special characters to the file name. Ive notice it only does that if the file has a long name. Ive tried removing '_' but is still puts those characters.

$sftp->get($order, 'Modules\*' . $order))

original name:

Master-124251-SALES_​CMPLT​_NOTIFICATION-01102019-102045.csv

output:

Master-124251-SALES_​CMPLT​_NOTIFICATION-01102019-102045.csv

Any solutions for this? thanks guys

So i figure it out with the reminder of one person. I just added this to my server config

<add key="AddDefaultCharset" value="utf8_general_ci"/>

And it works just fine. Hope it helps anyone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM