Invalid character encoding: foo
There is a problem with the character encoding specified.
This may be a typo, for example,
utf-8, or may be an encoding that isn't registered.
Replace the specified encoding with one of the registered character set.
Not clear? Disagree?
You might be able to find help in one of these fine resources.