When working on projects that use different character encodings I find myself constantly switching the character encoding of a terminal. In some terminals (e.g. gnome-terminal) you can create profiles for different terminals (say, profile "Project A" for the project that uses UTF-8 and profile "Project B" for the one that uses ISO-8859-1) but doing this only for switching the encoding is awkward.
Is there a sensible way to switch the encoding automatically, e.g. using a dot-file in the project root directory or using revision control meta data?