[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Strange behaviour with accented characters



This one time, at band camp, Jorge Santos said:
> Hello, when I do a 'su -' to root I get '?' instead of accented
> characters when doing, for example an 'ls'.  This only happens with
> 'su -', not with regular logins nor with 'su' (without the '-'), it
> also appear to be independent of the shell used and the terminal
> emulator used (it also happens in the console).
> 
> Any ideas why this may be?

Presumably you have locale settings in your .bashrc, or .bash_profile.
When you su (no -), you get a root shell that inherits the environment
that spawned it, so your $PATH and environment stay the same.

When you su - root, you get a brand new root shell, that only sources
.profile and others in the /root directory.  I assume root doesn't have
those same locale settings.

HTH,
Steve

-- 
This is a good time to punt work.

Attachment: pgpm5VbIducwU.pgp
Description: PGP signature


Reply to: