isamert / jaro

a highly customizable xdg-open alternative
GNU General Public License v3.0
67 stars 3 forks source link

Issue with non-ASCII character #2

Closed liz-desartiges closed 5 years ago

liz-desartiges commented 5 years ago
jaro ~/Téléchargements/LICENSE.txt                 
Backtrace:
In ice-9/boot-9.scm:
 160: 9 [catch #t #<catch-closure 7fbfc1915740> ...]
In unknown file:
   ?: 8 [apply-smob/1 #<catch-closure 7fbfc1915740>]
In ice-9/boot-9.scm:
  66: 7 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 6 [eval # #]
In /home/striker/.local/bin/jaro:
 384: 5 [main #]
 349: 4 [run-assoc-list "/home/striker/Téléchargements/LICENSE.txt" #]
 334: 3 [x "/home/striker/Téléchargements/LICENSE.txt" #f]
 266: 2 [run-fn-or-system #<procedure 7fbfc15a7c00 at /home/striker/.local/bin/jaro:216:2 (file mime-type)> ...]
 217: 1 [#<procedure 7fbfc15a7c00 at /home/striker/.local/bin/jaro:216:2 (file mime-type)> "/home/striker/Téléchargements/LICENSE.txt" ...]
In unknown file:
   ?: 0 [concatenate (#f # # # ...)]

ERROR: In procedure concatenate:
ERROR: In procedure append: Wrong type argument in position 1 (expecting empty list): #f

This happen only when I give a relative or full path of a file (but it does work for current folder files)

isamert commented 5 years ago

The error and causes were a little bit different in my case so if the issue persists please reopen or if you get any other errors please open a new issue.

liz-desartiges commented 4 years ago

Now it's not crashing it seams like it doesn't handle utf-8. with echo and a path containing french accents

$ jaro ~/Téléchargements/LICENSE.txt
/home/striker/T?l?chargements/LICENSE.txt
liz-desartiges commented 4 years ago

adding (setlocale LC_ALL "en_US.UTF-8") at the beginning of jaro seems to fix the issue

liz-desartiges commented 4 years ago

also tried with CJK character same issue occur. I never programmed in guile and I think this fix might be problematic (if people do not have the en_US.UTF-8 locale) by default I have this locale

scheme@(guile-user) [2]> (setlocale LC_ALL)
$1 = "fr_FR.UTF-8"