Fixed issue with unset locale causing breakage in Java encoding detection (javamail).