--- lib/MARC/File/USMARC.pm.orig 2005-04-22 17:11:04.000000000 -0400
+++ lib/MARC/File/USMARC.pm 2008-01-14 14:59:45.000000000 -0500
@@ -166,10 +166,13 @@
my $tagdata = bytes::substr( $text, $data_start+$offset, $len );
- # if utf8 the we encode the string as utf8
- if ( $marc->encoding() eq 'UTF-8' ) {
- $tagdata = marc_to_utf8( $tagdata );
- }
+# Mon, Jan 14, 2008 @ 14:52:40 EST
+# Thien Ho <thienho@gmail.com>
+# marc_to_utf8 calls decode() to convert UTF-8 string. That could return invalid UTF-8 characters.
+# # if utf8 the we encode the string as utf8
+# if ( $marc->encoding() eq 'UTF-8' ) {
+# $tagdata = marc_to_utf8( $tagdata );
+# }
$marc->_warn( "Invalid length in directory for tag $tagno $location" )
unless ( $len == bytes::length($tagdata) );