Decode input, encode output. That's what Perl Unicode advice says, and it happens...
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 16 Apr 2010 15:02:46 +0000 (15:02 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 16 Apr 2010 15:02:46 +0000 (15:02 +0000)
Tested on Conifer production, no problems were introduced.

git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6_0@16250 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm

index 1279f37..b5088d0 100644 (file)
@@ -1708,7 +1708,8 @@ sub sru_search {
                                        )
                                );
 
-                               $marcxml = $marc->as_xml_record();
+                               # Ensure the data is encoded as UTF8 before we hand it off
+                               $marcxml = encode_utf8($marc->as_xml_record());
                                $marcxml =~ s/^<\?xml version="1.0" encoding="UTF-8"\?>//o;
 
                        }