[Spacewalk-list] Malformed utf-8 character in oracle db

Michael Mraka michael.mraka at redhat.com
Fri May 20 09:55:09 UTC 2011


Sascha Bendix wrote:
% Hi,
% 
% > Currently I get during the spacewalk-dump-schema the following message:
% > Malformed UTF-8 character (fatal) at /usr/bin/spacewalk-dump-schema line
% > 121.
% > 
% > It seems that there is a non-UTF-8 encoded character in somewhere around
% > changelog entry 685488. Could that be the case?
% 
% jfi: I could fix the import by overwriting the changelog entry like this:
% 
% update rhnpackagechangelogdata set TEXT='NON-UTF-8 TEXT DELETED' where id=685488;
% commit;

Hi Sascha,

could you check whether this patch fixes your issue?

Regards,

--
Michael Mráka
Satellite Engineering, Red Hat

-------------- next part --------------
diff --git a/utils/spacewalk-dump-schema b/utils/spacewalk-dump-schema
index 6877635..e391111 100755
--- a/utils/spacewalk-dump-schema
+++ b/utils/spacewalk-dump-schema
@@ -119,6 +119,7 @@ sub process_table {
 					$row->[$i] =~ s!(.)! sprintf "\\\\%03o", ord($1) !seg;
 				} else {
 					$row->[$i] =~ s!([\x00-\x1f\x5c])! sprintf "\\x%02x", ord($1) !seg;
+                                        utf8::encode($row->[$i]); utf8::decode($row->[$i]);
 				}
 				print $row->[$i];
 			} else {


More information about the Spacewalk-list mailing list