Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

isSchemaValid does chang the xml-encoding header from UTF-8 to WINDOWS-1252

Norbert.HeinMar 3 2011 — edited Mar 4 2011
I found the following effect:

isSchemaValid does changing the encoding - entry of the xml-file-header

--------------------------------------------------------------------------
generating xml-file by using DBMS_XMLGEN :

xmldoc := DBMS_XMLGEN.getXML(ctx);

with the header of the file is
<?xml version="1.0" encoding="UTF-8"?>

-------------------------------------------------------------------
change the xmldoc to a xmlType
and validate it against the schema

xmldoc_xmlType:=(xmltype(xmldoc)) ;

xmldoc_xmlType.isSchemaValid ( bSchemalocation)

after this the header of the file is
<?xml version="1.0" encoding="WINDOWS-1252"?>

----------------------------------------------------------------------
my DB:

R11_2_0_2 / Windows 64
the same in
R11_2_0_1 / Windows 32
----------------------------------------------------------------------------------------------
select name, value from v$parameter where upper(name) like '%NLS%'

nls_calendar
nls_comp BINARY
nls_currency
nls_date_format
nls_date_language
nls_dual_currency
nls_iso_currency
nls_language AMERICAN
nls_length_semantics BYTE
nls_nchar_conv_excp FALSE
nls_numeric_characters
nls_sort
nls_territory AMERICA
nls_time_format
nls_timestamp_format
nls_timestamp_tz_format
nls_time_tz_format


---------------------------------------------------------------------------------------
register my schema by:

dbms_xmlschema.registerSchema(
schemaurl => vschemaurl,
schemadoc => xsd_file,
local => FALSE,
gentypes => TRUE,
genbean => FALSE,
gentables => TRUE,
force => FALSE,
owner => dbuser
,CSID => nls_charset_id('AL32UTF8')

----------------------------------------------------------------------------------------

How can I let or change back the xml-encoding entry to UTF-8 ?

regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 1 2011
Added on Mar 3 2011
5 comments
495 views