在Oracle ISO数据库中对文件XML UTF 8进行编码(带有重音符号的问题)

时间:2018-08-31 10:03:13

标签: xml oracle encoding utf-8 iso

一个xml文件被编码为utf-8。 我想将此文件加载到以ISO编码的oracle数据库中: NLS_CHARACTERSET = WE8ISO8859P15。

我们使用了此功能:

declare
   i_aag_id  number := 3878;
   i_dir varchar2(50) := 'EXT_TAB_DIR';
   i_file varchar2(50) := 'PVAG_3878_AR.xml';
   i_type_pjs varchar2(20) := 'PVAR';
   l_clob   CLOB;
   xml_pjs XMLTYPE;
   l_bfile  BFILE := BFILENAME(i_dir, i_file);
begin
   DBMS_LOB.createtemporary (l_clob, TRUE);
   DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly);
   DBMS_LOB.loadfromfile(l_clob, l_bfile, DBMS_LOB.getlength(l_bfile));
   insert into adb_ag_pjs (aag_id,aag_pjs,aag_pjs_doc,aag_pjs_archive,aag_type_pjs)
   values (1,XMLTYPE.createXML(l_clob),null,1,i_type_pjs);
end;

不幸的是,口音加载不正确:

<?xml version = '1.0' encoding = 'UTF-8'?>
<pjs:Campaign Version="1.0" TrackId="C222_PVAR_3878" Name="C222_PVAR_3878" BreakdownCode="C222" Application="REALESTATE" xmlns:com="http://www.maileva.fr/CommonSchema" xmlns:spec="http://www.maileva.fr/MailevaSpecificSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:pjs="http://www.maileva.fr/MailevaPJSSchema">
<pjs:Requests>
   <pjs:Request MediaType="PAPER" TrackId="C222_PVAR_3878">
     <pjs:Recipients>
        <pjs:Internal>
           <pjs:Recipient TrackId="MLE PARE MARIE THÿ¿Rÿ¿SE" Id="1">
                 [...]

您是否有想法将带有重音符号的utf-8 xml文件编码加载到oracle iso数据库中? 谢谢

0 个答案:

没有答案