diff --git a/httprl.module b/httprl.module index 36edd12..1a6f7df 100755 --- a/httprl.module +++ b/httprl.module @@ -205,6 +205,8 @@ function httprl_request($url, array $options = array()) { // Make sure the socket opened properly. if (!$fp) { + // Convert error message to utf-8. + $errstr = iconv('utf-8', 'utf-8//IGNORE', $errstr); if (!$errno) { // If $errno is 0, it is an indication that the error occurred // before the connect() call. This is most likely due to a problem