I've seen similar garbled output on systems when the terminal can't display UTF-8 characters, for example when
syscons(4) is the console driver, which is exactly here the case, taking the command prompts red cursor (visible in the left bottom corner of the image), and *.UTF-8 locale is set, which is the norm of the "default" login class in all currently supported FreeBSD versions:
/etc/login.conf
Code:
default:\
...
:charset=UTF-8:\
:lang=C.UTF-8:
EDIT
Just remove the backslash from "umask" and comment the last lines in the "default" class in
/etc/login.conf
Code:
default:\
...
:umask=022:
# :charset=UTF-8:\
# :lang=C.UTF-8:
cap_mkdb /etc/login.conf
Exit logged in user, log in again.
/EDIT
Try setting a different "charset" and "lang" in the users
~/.login_conf, or globally from
/etc/login.conf. If from there, don't forget to run
cap_mkdb /etc/login.conf
to rebuild the database.
List with
locale -a
all available (non-UTF-8 and UTF-8) locales (those are also found under
/usr/share/locale), or specific, for Ukrainian for example
locale -a | grep uk_UA
.
See also handbook
Chapter 25. Localization - i18n/L10n Usage and Setup