Download & Extend

UTF-8 byte order mark breaks import

Project:Drupal core
Version:5.x-dev
Component:language system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

some utf-8 files begining with a header like 0xEF 0xBB 0xBF

Comments

#1

Project:Auto locale import» Drupal core
Version:5.x-1.x-dev» 6.x-dev
Component:Code» language system
Category:feature request» bug report

Well, it is not a good idea to have files with UTF8 BOM, it causes you lots of complications. So the interim solution is to remove that yourself.

The import itself is done by Drupal (whether with autolocale module or Drupal 6 built-in), not autolocale, so the Drupal importer cannot handle such files then. Which means this should be fixed there.

#2

Title:do handle utf-8 text file's header» Handle UTF-8 byte order mark in .po files when importing

Fixing title.

#3

Title:Handle UTF-8 byte order mark in .po files when importing» UTF-8 byte order mark breaks import
Status:active» needs review

OK, here is a patch for review. Since there was a second guy who came with this problem (also from Hungary), and this really looks straightforward to fix, why not do it? Please review!

AttachmentSizeStatusTest resultOperations
import.BOM_.patch707 bytesIgnored: Check issue status.NoneNone

#4

It works for me.

#5

Version:6.x-dev» 5.x-dev
Status:needs review» reviewed & tested by the community

Great. Committed to Drupal 6. Let's get this into the next Drupal 5.x also.

#6

Status:reviewed & tested by the community» fixed

Committed to 5.x.

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.