Caused by: java.io.UTFDataFormatException: Invalid UTF8 encoding.
The xml page cannot be displayed
an invalid character was found in text content
When we run the report, only part of the data in showed in the xml file.
After we spend a long time tested and found there have special char in item description.
so we applied this script. to remove the special char, then the report works well
declare
s varchar2(4000);
s1 varchar2(4000);
s2 varchar2(4000);
a number;
b number;
cursor cur_desc IS
SELECT MSI.DESCRIPTION, segment1
FROM APPS.mtl_system_items_b MSI
WHERE segment1 IN(....)
AND ORGANIZATION_ID = 100;
begin
for cur1 in cur_desc Loop
a := 0;
a := length(cur1.description);
s := substr(cur1.description, 1, 1);
for i in 2 .. a loop
b := ascii(substr(cur1.description, i, 1));
-- dbms_output.put_line('Value of b is :: ' || b || ':: for value :: ' ||substr(cur1.description,i,1) );
if b not in (49855, 55328, 176, 150, 189, 190, 248) then
s := s || substr(cur1.description, i, 1);
end if;
end loop;
--dbms_output.put_line('for item :: ' || cur1.segment1 || ' :: ' || 'Description is :: ' || s);
INSERT INTO apps.mtl_system_items_interface
(segment1,
organization_id,
transaction_id,
process_flag,
set_process_id,
transaction_type,
description)
values
(cur1.segment1, 100, NULL, 1, xxxx, 'UPDATE', s);
end loop;
end;
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15225049/viewspace-708741/
,如需转载,请注明出处,否则将追究法律责任。