Index: includes/locale.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/locale.inc,v retrieving revision 1.157 diff -u -p -r1.157 locale.inc --- includes/locale.inc 11 Nov 2007 16:14:45 -0000 1.157 +++ includes/locale.inc 18 Nov 2007 21:36:11 -0000 @@ -1015,6 +1015,10 @@ function _locale_import_read_po($op, $fi while (!feof($fd)) { $line = fgets($fd, 10*1024); // A line should not be this long + if ($lineno == 0) { + // The first line might come with a UTF-8 BOM, which should be removed. + $line = str_replace("\xEF\xBB\xBF", '', $line); + } $lineno++; $line = trim(strtr($line, array("\\\n" => "")));