Status: Accepted
Owner: ----
Labels: Priority-High Type-Defect Target-2.5.2
New issue 616 by pekka.klarck: Encoding got from the environment may be
invalid and crash execution on Unixes
http://code.google.com/p/robotframework/issues/detail?id=616
The framework tries to get the encoding to use when writing to, and reading
from, the console from the encoding used in sys.stdout and sys.stdin. This
fails, at least, when both stdin and stdout are redirected, and a plan b is
needed. On Windows the framework just uses the default Dos encoding cp437,
and on Unixes it tries to find correct encoding from the environment
variables. It doesn't, however, verify that the encoding it gets is
correct, and invalid encoding may crash the whole execution. A way to
reproduce this, at least on Linux, is running this command, which results
on LookupError:
echo "redirect stdin" | LANG=invalid pybot tests.txt > stdout.txt
It seems that on OSX this problem occurs more often than on Linux (at least
on Ubuntu). The problem in issue 594 is most likely caused by this too, and
similar symptoms are visible also on the comment by frank_fen to
Installation wiki page:
http://code.google.com/p/robotframework/wiki/Installation