When importing a file in RIS format that's encoded in UTF-8 and contains a UTF-8 bom the first entry gets lost because the $start variable is initialised to 5 and this causes eg. TY = JOUR to become(tag = '', value = 'UR);

This might be caused by using strpos to determine the position and drupal_substr for the actual splitting of the line.

Maybe the following ticket can help: this seems to fix a similar problem: http://drupal.org/node/173858

In the end I found a simple solution, I just added an empty first line to the file, this makes the BOM stick to an empty line and makes the actual first line correct.

Comments

rjerome’s picture

Hmm, this is exactly what the "$start" variable was supposed to avoid.

I'll check into it.

Ron.

bekasu’s picture

Status: Active » Closed (fixed)

Marking issue closed.