Index: main/trunk/greenstone2/perllib/plugins/PDFPlugin.pm =================================================================== --- main/trunk/greenstone2/perllib/plugins/PDFPlugin.pm (revision 30490) +++ main/trunk/greenstone2/perllib/plugins/PDFPlugin.pm (revision 30491) @@ -314,4 +314,6 @@ # be useful to give an indication of document length in browser through setting # num_pages as metadata. + # Clean html from low and hight surrogates D800âDFFF + $text =~ s@[\N{U+D800}-\N{DFFF}]@\ @g; my @pages = ($text =~ m/\<[Aa] name=\"?\w+\"?>/ig); #