UTF-8 byte order mark breaks import

Gábor Mayer - September 7, 2007 - 16:48
Project:Drupal
Version:5.x-dev
Component:language system
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

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

#1

Gábor Hojtsy - October 2, 2007 - 14:42
Project:Auto locale import» Drupal
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

Gábor Hojtsy - October 2, 2007 - 16:28
Title:do handle utf-8 text file's header» Handle UTF-8 byte order mark in .po files when importing

Fixing title.

#3

Gábor Hojtsy - November 18, 2007 - 21:39
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 bytesIgnoredNoneNone

#4

aries - November 21, 2007 - 18:12

It works for me.

#5

Gábor Hojtsy - November 21, 2007 - 18:25
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

drumm - December 17, 2007 - 01:54
Status:reviewed & tested by the community» fixed

Committed to 5.x.

#7

Anonymous - December 31, 2007 - 02:01
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.