Session encoding/language - Unix

This is a discussion on Session encoding/language - Unix ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Session encoding/language

  1. Session encoding/language

    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,
    Alona


  2. Re: Session encoding/language

    allab@sympatico.ca wrote in
    <1146590536.653960.54580@v46g2000cwv.googlegroups.c om> on Tue May 2 2006
    13:22:

    > 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,
    > Alona


    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
    en_AU.ISO8859-1
    en_AU.ISO8859-15
    en_CA.ISO8859-1
    en_CA.ISO8859-15
    en_GB.ISO8859-1
    en_GB.ISO8859-15
    en_US.ISO8859-1
    en_US.ISO8859-15
    en_US.UTF-8
    [0:af/f/fd0man>

    In my case, I wanted UTF-8, so I set my LANG in my .profile:

    [0:af/f/fd0man> cat .profile | grep LANG
    export LANG=en_US.UTF-8
    [0:af/f/fd0man>

    To confirm that it works, log out, log back in, and then type 'locale':

    [0:af/f/fd0man> locale
    LANG="en_US.UTF-8"
    LC_CTYPE="en_US.UTF-8"
    LC_COLLATE="C"
    LC_TIME="C"
    LC_NUMERIC="C"
    LC_MONETARY="C"
    LC_MESSAGES="en_US.UTF-8"
    LC_ALL=""
    [0:af/f/fd0man>

    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: é
    copyright: ©
    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.

    - Mike

+ Reply to Thread