My Oracle Support Banner

When Using DBMS_LOB.CONVERTTOCLOB French Characters With An Accent Are Replaced (Doc ID 436168.1)

Last updated on JANUARY 17, 2020

Applies to:

PL/SQL - Version 9.2.0.8 and later
Information in this document applies to any platform.

Symptoms

When using DBMS_LOB.CONVERTTOCLOB on a UTF8 database to convert a BLOB to a CLOB then the output is wrong. Instead of 

          dgdgd,route de l'université Bejaia

the output is:

          dgdgd,route de l'universit¿ejaia

or

          dgdgd,route de l'université ‚ejaia

Code:

desc test:

Name   Type
-----------------
ID NUMBER
TEXT BLOB

DECLARE
 v_maxsize INTEGER := DBMS_LOB.LOBMAXSIZE;
 v_dest_offset INTEGER := 1;
 v_src_offset INTEGER := 1;
 v_default_csid INTEGER := DBMS_LOB.DEFAULT_CSID;
 v_lang_context INTEGER := DBMS_LOB.DEFAULT_LANG_CTX;
 v_warning INTEGER;
 CBLOB BLOB;
 CCLOB CLOB;
 CURSOR lob_data IS
    select text from test;
BEGIN
   OPEN lob_data;
     FETCH lob_data INTO cblob;
   CLOSE lob_data;
   DBMS_LOB.CREATETEMPORARY( cclob, TRUE); 
   DBMS_LOB.CONVERTTOCLOB( cclob,
      cblob,
      v_maxsize,
      v_dest_offset,
      v_src_offset,
      v_default_csid,
      v_lang_context,
      v_warning );
   dbms_output.put_line(cclob);
END;
/

dgdgd,route de l'universit¿ejaia

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.