subhra74 / snowflake

Graphical SFTP client and terminal emulator with helpful utilities
GNU General Public License v3.0
2.16k stars 231 forks source link

User locale in snap #155

Open angmac opened 3 years ago

angmac commented 3 years ago

Describe the bug Snap version dosen't handle user locale settings ($LANG) and fail on the non-ascii UTF-8 directory names (for example Képek with LANG=hu_HU.UTF-8)

java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/johans/K??pek at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145) at java.base/sun.nio.fs.UnixPath.(UnixPath.java:69) at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:279) at java.base/java.io.File.toPath(File.java:2292) at snowflake.common.local.files.LocalFileSystem.list(LocalFileSystem.java:59) at snowflake.components.files.browser.local.LocalFileBrowserView.lambda$new$1(LocalFileBrowserView.java:57) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)

.deb version works well with the right LANG settings

To Reproduce (1) Install snap version (2) Open a shell and make a directory with UTF-8 character: $ export LANG=hu_HU.UTF-8 $ mkdir Képek (3) Start snowflake (4) Connect to a remote host

Snowflake drops exception and unable to show the content of local directory

Expected behavior Show the content of the local directory encoded in UTF-8

Desktop (please complete the following information): Ubuntu 20.10 Destop

angmac commented 3 years ago

It is the same as #130