You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Description
I encountered a FormatException error while using the dartssh2 library for SFTP operations when directories contain filenames with special characters. The error message is as follows:
This issue seems to occur when trying to decode byte data into a UTF-8 string. The problem arises if filenames in the directory do not conform to the UTF-8 encoding standard.
Steps to Reproduce
Connect to an SFTP server.
Try to list a directory containing non-UTF-8 encoded filenames.
Observe the FormatException error.
Expected Behavior
The dartssh2 library should be able to handle filenames with special characters, even if they are not UTF-8 encoded, without throwing an exception.
Request
Please consider adding support for non-UTF-8 encoded filenames, or provide a way to gracefully handle these cases, such as using replacement characters for parts that cannot be decoded.
The text was updated successfully, but these errors were encountered:
Problem Description
I encountered a FormatException error while using the dartssh2 library for SFTP operations when directories contain filenames with special characters. The error message is as follows:
''' sh
FormatException: Unexpected extension byte (at offset 1)
#0 _Utf8Decoder.convertSingle (dart:convert-patch/convert_patch.dart:1747:7)
#1 Utf8Decoder.convert (dart:convert/utf.dart:351:42)
#2 Utf8Codec.decode (dart:convert/utf.dart:63:20)
#3 SSHMessageReader.readUtf8 (package:dartssh2/src/ssh_message.dart:75:17)
...
This issue seems to occur when trying to decode byte data into a UTF-8 string. The problem arises if filenames in the directory do not conform to the UTF-8 encoding standard.
Steps to Reproduce
Connect to an SFTP server.
Try to list a directory containing non-UTF-8 encoded filenames.
Observe the FormatException error.
Expected Behavior
The dartssh2 library should be able to handle filenames with special characters, even if they are not UTF-8 encoded, without throwing an exception.
Request
Please consider adding support for non-UTF-8 encoded filenames, or provide a way to gracefully handle these cases, such as using replacement characters for parts that cannot be decoded.
The text was updated successfully, but these errors were encountered: