Page 1 of 1

EAD import script error

PostPosted: Wed Aug 31, 2011 3:51 pm
by cnelson
Hi there, I have several EAD files that fail to import in version 3.21. I get the following error message from the importer:

Fatal error: Call to undefined function mb_detect_encoding() in /var/www/fcla/3.21/packages/collections/db/ on line 67

I'm sorry if this has been addressed before in the forum, I was unable to search because apparently "EAD import" and "EAD import error" are rejected by phpBB's search interface as being "too common"! So none of the posts I browsed for at least contained this information.

Your help is appreciated, thanks!

Re: EAD import script error

PostPosted: Wed Sep 21, 2011 3:55 pm
by cnelson

I commented out lines 67-72 of the packages/collections/db/ script, which are as follows:

// $currEncoding = mb_detect_encoding($strXML, 'UTF-8, ISO-8859-1');
// if ($currEncoding != 'UTF-8')
// {
// echo("File encoded in $currEncoding. Converting to UTF-8...<br/>\n");
// $strXML = encoding_convert_encoding($strXML, 'UTF-8', $currEncoding);
// }

This solved two problems: (1) There was a large amount of PHP error code showing up at the top of the Database Management Admin page when I tried to import - that went away after I commented out the code. (2) My EAD successfully imported!

I'm concerned about the ramifications of commenting out this functionality, however. Can you address this issue?

Re: EAD import script error

PostPosted: Wed Oct 19, 2011 12:44 am
by paulnsorensen
Yes, thanks for pointing out this issue. I'll see that this gets addressed, or we at least find a work around for the next revision.