Is there a way to set session encoding not through a desktop session?
Can session encoding be modified through configuration file so that
when a user logs in through telnet s/he can create files with
Re: Session encoding/language
[email]firstname.lastname@example.org[/email] wrote in
<email@example.com> on Tue May 2 2006
> Hello everyone,
> Is there a way to set session encoding not through a desktop session?
> Can session encoding be modified through configuration file so that
> when a user logs in through telnet s/he can create files with
> non-english names.
> Thank you,
You may or may not be addressing more then one point in there, that I don't
know. I'll address what I can.
The encoding that the terminal expects is set by the LANG shell variable.
To get valid values for LANG, run:
$ locale -a | grep -i en
To get valid English locales that are installed on the system (if you want
things in different messages, change 'en' to whatever two character
language designation you're looking for):
[0:af/f/fd0man> locale -a | grep -i en
In my case, I wanted UTF-8, so I set my LANG in my .profile:
[0:af/f/fd0man> cat .profile | grep LANG
To confirm that it works, log out, log back in, and then type 'locale':
Some systems will set all of those things for you. You should then be able
to enter things like é and Ä on the bash command line.
However, note that not all of the applications that you may use on the
system may be aware of the encoding in use. For example, when you type a
UTF-8 character in Emacs when the terminal encoding is UTF-8, but the
currently running Emacs doesn't have UTF-8 support, you see:
e accented: Ã©
a dotted: Ã¤
c ced: Ã§
C ced: Ã
Which, as you can see, are not correct. Also, if it doesn't speak UTF-8,
the filenames that have foreign characters in them may get mangled. If the
entire system supports UTF-8 though, you're all set.
However, keep in mind that the client system must be able to support the
characters being entered. i.e., if I can't type "en français" on my
keyboard, then no matter what the session encoding is, that c cedilla
character isn't going to make it in there.