Error code 2 (SFTP) with a accented directory name

Advertisement

ericb44
Joined:
Posts:
2
Location:
France

Error code 2 (SFTP) with a accented directory name

Hello,

This reproductible bug is coming when a click in ordre to enter to a directory named "vélo".

This is environment:
  • Windows 10 (FR)
  • WinSCP 5.15.4
  • Linux server: Debian 3 with locale fr_FR.UTF-8
  • protocol: SFTP-3
Error message (in French):
Impossible d'obtenir le chemin réel de '/media/vg1-lv1/lv2/ROOTTREE_WORK/PERSO/Vélo'
Fichier ou répertoire inexistant
Code d'erreur : 2
Message d'erreur du serveur : No such file
Log file:
. 2019-09-26 19:02:19.585 Changing directory to "Vélo".
. 2019-09-26 19:02:19.585 Getting real path for '/media/vg1-lv1/lv2/ROOTTREE_WORK/PERSO/Vélo'
> 2019-09-26 19:02:19.585 Type: SSH_FXP_REALPATH, Size: 52, Number: 425232
< 2019-09-26 19:02:19.585 Type: SSH_FXP_STATUS, Size: 29, Number: 425232
< 2019-09-26 19:02:19.585 Status code: 2, Message: 425232, Server: No such file, Language:  
* 2019-09-26 19:02:19.600 (ECommand) Erreur lors du changemenent de répertoire vers 'Vélo'.
* 2019-09-26 19:02:19.600 Impossible d'obtenir le chemin réel de '/media/vg1-lv1/lv2/ROOTTREE_WORK/PERSO/Vélo'
* 2019-09-26 19:02:19.600 Fichier ou répertoire inexistant
* 2019-09-26 19:02:19.600 Code d'erreur : 2
* 2019-09-26 19:02:19.600 Message d'erreur du serveur  : No such file
Notice: other directory at the same level without accented char are ok, it is not a permission problem I can enter into dir vélo :)

Thank you for your answer.
Have a good day :)

Reply with quote

Advertisement

ericb44
Joined:
Posts:
2
Location:
France

Hello,

I've just verified my issue with the 5.15.5.
All works now (access accented dir, put/get accented file) without any modification (WinSCP client and server file).
Thank you for your answer (Martin) and I list this project in my contributor list now :).

Reply with quote

igricheff
Guest

Error code 2 (SFTP) with a accented directory name

I encounter the same issue.
On my side, I wrote a PowerShell script with the WinSCP .NET assembly.
To solve the issue, I change the encoding of the script file to ISO 8859-1

Maybe this trick can help you.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,468
Location:
Prague, Czechia

Re: Error code 2 (SFTP) with a accented directory name

@igricheff: PowerShell script should use UTF-8 (with BOM!) encoding (preferred) or Windows/ANSI encoding (legacy):
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_character_encoding
So not really ISO. Though ISO 8859-1 is rather similar to Windows/ANSI 1252. That's probably why it worked for you.

Though none of this is that this topic is actually about. This topic is about WinSCP GUI. PowerShell script encoding has nothing to do with WinSCP (not even with WinSCP .NET assembly).

Reply with quote

Advertisement

You can post new topics in this forum