Weird characters in shell

stavros-k

Patron
Joined
Dec 26, 2020
Messages
231
When i `ls` in shell or bash (even in putty via ssh) i get the weird results. I think it returns the ascii code for each letter.
It only happens in Greek letters. Not in English. Tried to change locale on WebGUI to Greek but didn't help.

I just started using truenas and i'm not very familiar with the UI. Is there a UI setting for this? Or i need to do it via command line?
Googling didn't bring me any useful results. But again i don't know how to describe this error in order to search properly!
Thanks!

example output:
Code:
drwxrwxr-x+  2 skois users   8 Jan  8 08:34 ''$'\316\214\316\274\316\271\316\273\316\277\317\202'
drwxrwxr-x+  2 skois users   4 Jan  8 08:37 ''$'\316\227'' '$'\317\200\316\261\316\273\316\261\316\271\316\254'' '$'\316\261\316\263\316\277\317\201\316\254'
drwxrwxr-x+  2 skois users   3 Jan  8 08:37 ''$'\316\227\317\201\316\261\316\257\316\277\316\275'' Cafe'
drwxrwxr-x+  2 skois users   8 Jan  8 08:37 ''$'\316\230\316\254\317\203\316\277\317\202'
drwxrwxr-x+  2 skois users 282 Jan  8 08:38 ''$'\316\230\316\265\317\203\317\203\316\261\316\273\316\277\316\275\316\257\316\272\316\267'
drwxrwxr-x+  2 skois users 115 Jan  8 08:38 ''$'\316\231\316\272\316\261\317\201\316\257\316\261'
drwxrwxr-x+  2 skois users   9 Jan  8 08:38 ''$'\316\232\316\244\316\225\316\233'
drwxrwxr-x+  2 skois users 232 Jan  8 08:38 ''$'\316\232\316\261\316\262\316\254\316\273\316\261'' '$'\316\224\316\271\316\254\317\206\316\277\317\201\316\261'
drwxrwxr-x+  2 skois users  27 Jan  8 08:38 ''$'\316\232\316\261\316\262\316\254\316\273\316\261'' '$'\316\232\316\254\317\203\317\204\317\201\316\277'
drwxrwxr-x+  2 skois users   4 Jan  8 08:38 ''$'\316\232\316\261\316\273\316\254'' '$'\316\272\317\201\316\261\317\203\316\254'
drwxrwxr-x+  2 skois users  28 Jan  8 08:38 ''$'\316\232\316\261\317\204\316\261\317\201\317\201\316\254\316\272\317\204\316\265\317\202'' '$'\316\232\316\261\317\201\316\273\317\214\316\262\316\261\317\203\316\271'
drwxrwxr-x+  2 skois users  56 Jan  8 08:38 ''$'\316\232\316\277\316\273\316\277\316\272\316\277\317\204\317\201\317\211\316\275\316\257\317\204\317\203\316\271'' ('$'\316\232\316\261\317\201\317\205\316\254'')'
drwxrwxr-x+  2 skois users 466 Jan  8 08:38 ''$'\316\232\316\277\316\274\316\277\317\204\316\267\316\275\316\256'
drwxrwxr-x+  2 skois users  30 Jan  8 08:39 ''$'\316\233\316\261\317\215\317\201\316\271\316\277'' - '$'\316\243\316\277\317\215\316\275\316\271\316\277'
drwxrwxr-x+  2 skois users   4 Jan  8 08:39 ''$'\316\233\316\271\316\262\316\261\316\264\316\254\316\272\316\271'
drwxrwxr-x+  2 skois users  61 Jan  8 08:39 ''$'\316\234\316\261\317\201\316\257\316\275\316\261'
drwxrwxr-x+  2 skois users  32 Jan  8 08:39 ''$'\316\234\316\261\317\201\316\257\316\275\316\261'' '$'\316\226\316\225\316\221\316\243'
drwxrwxr-x+  2 skois users  93 Jan  8 08:39 ''$'\316\234\316\265\316\263\316\254\316\273\316\267'' '$'\316\233\316\254\316\272\316\272\316\261'
drwxrwxr-x+  2 skois users  88 Jan  8 08:39 ''$'\316\234\317\200\316\273\316\265'' Club'
drwxrwxr-x+  2 skois users  10 Jan  8 08:39 ''$'\316\234\317\205\317\201\316\277\316\262\317\214\316\273\316\277\317\202'' '$'\316\206\316\275\316\277\316\271\316\276\316\271\317\202'
drwxrwxr-x+  2 skois users  10 Jan  8 08:34 ''$'\316\235\316\277\317\203\316\277\316\272\316\277\316\274\316\265\316\257\316\277'' '$'\316\222\316\261\317\203\316\277\317\215\316\273\316\261'
drwxrwxr-x+  2 skois users   4 Jan  8 08:34 ''$'\316\236\316\254\316\275\316\270\316\267'
drwxrwxr-x+  2 skois users  23 Jan  8 08:34 ''$'\316\237\316\275\316\265\316\271\317\201\316\277\317\215\317\200\316\277\316\273\316\267'
drwxrwxr-x+  2 skois users  53 Jan  8 08:36 ''$'\316\240\316\255\317\201\316\261\316\274\316\277\317\202'
drwxrwxr-x+  2 skois users  19 Jan  8 08:36 ''$'\316\240\316\261\317\201\316\255\316\273\316\261\317\203\316\267'' '$'\316\243\317\215\316\275\317\204\316\261\316\263\316\274\316\261'
drwxrwxr-x+  2 skois users 332 Jan  8 08:34 ''$'\316\240\316\261\317\201\316\261\316\273\316\257\316\265\317\202'' '$'\316\243\316\254\316\274\316\277\317\202'
drwxrwxr-x+  2 skois users  31 Jan  8 08:36 ''$'\316\240\316\265\316\266\316\277\317\200\316\277\317\201\316\257\316\261'
drwxrwxr-x+  2 skois users  10 Jan  8 08:36 ''$'\316\240\317\205\316\270\316\261\316\263\317\214\317\201\316\265\316\271\316\277'' Beach Party'
drwxrwxr-x+  2 skois users  23 Jan  8 08:36 ''$'\316\240\317\215\317\201\316\263\316\277\317\202'' '$'\316\243\316\254\316\274\316\277\317\202'
drwxrwxr-x+  2 skois users 493 Jan  8 08:36 ''$'\316\243\316\254\316\274\316\277\317\202'' '$'\316\224\316\271\316\254\317\206\316\277\317\201\316\261'
drwxrwxr-x+  2 skois users  20 Jan  8 08:36 ''$'\316\244\316\225\316\231'
drwxrwxr-x+  2 skois users 151 Jan  8 08:37 ''$'\316\244\316\225\316\233\316\237'' 3'
drwxrwxr-x+  2 skois users  10 Jan  8 08:37 ''$'\316\244\316\245\316\225\316\230'
drwxrwxr-x+  2 skois users 116 Jan  8 08:37 ''$'\316\244\316\277'' '$'\316\274\316\271\316\272\317\201\317\214'' '$'\316\272\316\261\317\206\316\255'
drwxrwxr-x+  2 skois users 127 Jan  8 08:37 ''$'\316\244\317\203\317\214\317\200\316\265\316\273\316\261'
drwxrwxr-x+  2 skois users  85 Jan  8 08:37 ''$'\316\246\316\261\316\263\316\254\316\264\316\271\316\272\316\261'' '$'\316\243\316\254\316\274\316\277\317\202'
drwxrwxr-x+  2 skois users  10 Jan  8 08:37 ''$'\316\247\316\261\316\273\316\272\316\257\316\264\316\261'' '$'\316\224\316\271\316\254\317\206\316\277\317\201\316\261'
drwxrwxr-x+  2 skois users 255 Jan  8 08:37 ''$'\316\250\316\256\317\203\316\271\316\274\316\277'' '$'\316\232\316\261\316\262\316\254\316\273\316\261'
drwxrwxr-x+  2 skois users 677 Jan  8 08:37 ''$'\316\250\316\256\317\203\316\271\316\274\316\277'' '$'\316\243\316\254\316\274\316\277\317\202'
drwxrwxr-x+  2 skois users 203 Jan  8 08:37 ''$'\316\251\317\201\316\227\317\207\316\265\316\257\316\277'
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Your console needs to be set to display UTF-8 character set. Not sure if the necessary changes for locale would persist across reboots in SCALE, but try following the Debian instructions here:


I'd think UTF-8 would be standard now across Linux though.
 

stavros-k

Patron
Joined
Dec 26, 2020
Messages
231
Your console needs to be set to display UTF-8 character set. Not sure if the necessary changes for locale would persist across reboots in SCALE, but try following the Debian instructions here:


I'd think UTF-8 would be standard now across Linux though.

Tried to do dpkg-reconfigure locales
but locales package is not installed.
When i do export LC_ALL=C.UTF-8 Which is the only utf-8 locale truenas have available does work correctly. (locale -a, has given this info)
But i have to do this every time i get into a shell.
So i guess i'll have to apply this on the .bashrc on every reboot. But i think it will be easier to somehow truenas devs set the default LC_ALL to be C.UTF-8, now it shows (unset).
 

itet

Dabbler
Joined
Aug 19, 2020
Messages
26
I agree on this point, it is no main topic but it should be fixed for releases.

Installed Version: TrueNAS-SCALE-Angelfish-PRERELEASE 14. Jan 2021

outputs:
Code:
TrueNAS02# locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=

Code:
TrueNAS02# locale -a
C
C.UTF-8
POSIX

Code:
TrueNAS02# dpkg-reconfigure locales
dpkg-query: package 'locales' is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files.
/usr/sbin/dpkg-reconfigure: locales is not installed


after I have apt-get update I can do apt-get install locales and dpkg-reconfigure locales, but after a reboot all is gone again.
 
Top