Monday, January 30, 2017

Oracle XML Publisher Report: An Invalid character was found in text content


The following Error can be observed when Oracle XML Report data can contain foreign characters like Norwegian æøå, or french êèé. The  Output processor fails to process the data and the report logs shows follwoing error

"An Invalid character was found in text content"

Solution:
1. Find out the encoding that has been setup at the SITE leve using this query

SELECT po.user_profile_option_name, po.profile_option_name "NAME"
, DECODE (TO_CHAR (pov.level_id), '10001', 'SITE'
, '10002', 'APP', '10003', 'RESP', '10004', 'USER', '???') "LEV"
, DECODE (TO_CHAR (pov.level_id)
, '10001', '', '10002', app.application_short_name
, '10003', rsp.responsibility_key, '10004', usr.user_name, '???')
"CONTEXT"
, pov.profile_option_value "VALUE"
FROM apps.fnd_profile_options_vl po, apps.fnd_profile_option_values pov
, apps.fnd_user usr, apps.fnd_application app, apps.fnd_responsibility rsp
WHERE (po.profile_option_name = 'FND_NATIVE_CLIENT_ENCODING')
AND pov.application_id = po.application_id AND pov.profile_option_id =
po.profile_option_id
AND usr.user_id(+) = pov.level_value AND rsp.application_id(+) =
pov.level_value_application_id
AND rsp.responsibility_id(+) = pov.level_value AND app.application_id(+)
= pov.level_value
ORDER BY "NAME", pov.level_id, "VALUE"

2. Based on the above value setup in the PROFILE, set the XML TAG LINE as the first line of the Program output.

<?xml version="1.0" encoding="UTF-8"?>

<?xml version="1.0" encoding="UTF-16"?>
<?xml version="1.0" encoding="ISO-8859-1"?>

 <?xml version="1.0" encoding="windows-1252"?>

Also if none of the above options works try to use REPLACE function and remove the Special characters from the XML Output.

So your output should look like this

<?xml version="1.0" encoding="UTF-8"?><REPORT>
<REC><GL_PERIOD>01-12</GL_PERIOD><FISCAL>2012</FISCAL><QT>Q4-12</QT></REC>
</REPORT>

1 comment:

  1. Check encoding and special characters. Your understanding will be useful in solving problems. Thank you for sharing this solution. But recently, I am busy with my academic assignment synopsis writer online, if any guy knows my topic well recommend me professionally.

    ReplyDelete

Types of animations

Animation is a diverse and creative field with a variety of styles that artists and filmmakers use to bring their visions to life. Here are ...