Fix for problen with shell input stream encoding